cURL / Mailing Lists / curl-users / Single Mail

curl-users

Problem sending large compressed file

From: Woody Gingery <Wgingery_at_hotmail.com>
Date: Fri, 11 May 2007 12:44:05 -0400

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?

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);

Thank you
Received on 2007-05-11