[BioC] Using RCurl to upload CEL files to a LIMS

stephen at mnemosyne.co.uk stephen at mnemosyne.co.uk
Sat Mar 27 08:58:46 CET 2010


Dear Seth,

Fantastic - this has the problem cracked! 

Cheers

Stephen

On Mar 27, 2010, at 1:55 AM, Seth Falcon wrote:

> Hi Stephen,
> 
> On 3/22/10 12:37 PM, stephen at mnemosyne.co.uk wrote:
>> I am trying without success to upload an Affy CEL file to a LIMS
>> system using RCurl.
> 
>> The LIMS expects to receive a multipart formatted http post request
>> with some metadata in the headers. When I try to create an RCurl
>> statement to upload the file I get various errors complaining that
>> Http GET is not supported on the server - any help or suggestions
>> would be very gratefully received.
> 
> If your server wants an HTTP POST request with Content-Type: multipart/form-data, then maybe I can help.  Otherwise, I'm not sure I know what you want from your description.
> 
> Using the curl command line, I think you want something like this:
> 
> curl -F "fileOid=12345" \
>     -F "analyticalGroup=bob" \
>     -F "thefile=@thedata.txt" \
>     http://your-server/
> 
> I think you can achieve this using RCurl as follows:
> 
>> library("RCurl")
>> uri <- "http://your-server/"
>> postForm(uri,
>>         fileOid = "1234",
>>         analyticalGroup = "bob",
>>         theFile = fileUpload(filename = "~/temp/thedata.txt",
>>                    contentType = "text/amazing"),
>>         .encoding="uft-8")
> 
> If that does not work for you, perhaps you can try finding the right incantation using the curl command line.  With that, there is probably a way to figure out how to get RCurl to do what you want.
> 
> + seth
> 
> 
> -- 
> Seth Falcon
> Bioconductor Core Team | FHCRC



More information about the Bioconductor mailing list