cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Problem sending large compressed file

From: Woody Gingery <wgingery_at_hotmail.com>
Date: Fri, 11 May 2007 20:10:57 +0000

Actually, I don't know, we haven't tried sending a compressed file via the browser. I will try your recommendation Monday. Thank you.> Date: Fri, 11 May 2007 10:16:13 -0700> From: dan@coneharvesters.com> To: curl-users@cool.haxx.se> Subject: Re: Problem sending large compressed file> > On Fri, May 11, 2007 at 12:44:05PM -0400, Woody Gingery wrote:> > We have a large file that our customer has requested we send compressed. The> > file is being sent from a Perl script that is using https and curl. If we send> > the file compressed, the customer is unable to uncompress it with Winzip. We> > compressed it using gzip on a Unix server. I suspect I need to specify> > something in the curl command to send a compressed file but am unclear as to> > the syntax and various options (new to curl). This works okay with the file> > uncompressed. Should I be using the "data-binary" option?> > --data-binary produces a application/x-www-form-urlencoded form, whereas > -F produces a multipart form. You can't necessarily replace one with> the other.> > > The command in the script is: (I have disguised user name, password, etc)> > > > "https:\/\/www.xxxx.xxxx.xx.xx\/WebFX\/MainMenu\/Uploads\/UploadAFile\/> > index.cfm?fuseaction=loginandinsertdocumentrecord";> > # setup the system call to curl, passing the appropriate flags> > # --fail suppress output so it dies nicely> > # --output says to direct the output to the file named in $ARGV[3]> > # $http_string is where the file name and https address are stored> > @args = ("curl", '--fail', '-F', 'username=xxxxxxx', '-F',> > 'password=xxxxx', '-F', 'documentname='.$document_name, '-F',> > 'expirationdate='.$expire_date, '-F', 'Filecontents=@'.$source_file, '-F',> > "pbADD='Add new document information'", $https);> > You aren't setting a Content-Type on the uploaded file. curl might be> guessing and sending a type that's not binary. Use the ;type= syntax> to set an appropriate MIME type (e.g. application/octet-stream). It's> possible that the upload script expects something else (like a> Content-Encoding header). Are you able to correctly upload a compressed> file to this site using a browser?> > >>> Dan> -- > http://www.MoveAnnouncer.com The web change of address service> Let webmasters know that your web site has moved
_________________________________________________________________
Download Messenger. Start an i’m conversation. Support a cause. Join now.
http://im.live.com/messenger/im/home/?source=TAGWL_MAY07
Received on 2007-05-11