curl-users
Text File Upload over HTTP with curl -F
Date: Sat, 26 Jul 2003 05:37:50 -0400
Hi everyone,
I am trying to upload a tab-separated text file over https to Amazon
with curl. I do use curl for a number of things, but this is the first
instance where I've had to use curl -F. I have searched for examples:
the example on the tutorial page is more simple than what I am doing
here and I searched in Google, I cannot get this thing to work. First,
let me describe the working environment, so we're all on the same page.
I am on a Cobalt RAQ 550 and I am using curl 7.10.3 (i686-pc-linux-gnu)
libcurl/7.10.3 OpenSSL/0.9.6 zlib/1.1.4.
Getting to a certain point with curl, formfind.pl yields the following:
--- FORM report. Uses POST to URL
"/exec/panama/seller-admin/catalog-upload/catalog-upload-now"
--- type: multipart form upload [use -F]
Input: NAME="customer_id" (HIDDEN)
Select: NAME="FileType"
Option VALUE="" (SELECTED)
Option VALUE="TabDelimited"
Option VALUE="UIEE"
[end of select]
Input: NAME="enable-expedited-shipping" VALUE="Y" (CHECKBOX)
Input: NAME="ListingProgram" VALUE="ProMerchant" (RADIO)
Input: NAME="ListingProgram" VALUE="HybridSDP" (RADIO)
Input: NAME="ListingProgram" VALUE="PureSDP" (RADIO)
Select: NAME="FileOperationType"
Option VALUE="" (SELECTED)
Option VALUE="AMD"
Option VALUE="PR"
Option VALUE="MD"
[end of select]
Input: NAME="UploadFileName" (FILE)
Button: "" (IMAGE)
--- end of FORM
and here's my curl line:
/usr/local/bin/curl -b /tmp/cookies.txt -c /tmp/cookies.txt -o
upload_3.html -A "Mozilla" -F UploadFileName=@/path/to/textfile.txt -F
"customer_id=" -F "FileType=TabDelimited" -F
"enable-expedited-shipping=Y" -F "ListingProgram=HybridSDP" -F
"FileOperationType=PR" -L
https://secure.amazon.com/exec/panama/seller-admin/catalog-upload/catalo
g-upload-now
Previous curl commands have already signed me in, as required, and all
of that works fine.
Is there something I am obviously missing?
Thanks in advance for you advice.
Best Regards,
Ratio Corp.,
Daniel F. Reimann
dreimann at ratio dot net
http://www.ratio.net
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-07-26