cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP upload

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 18 Jul 2014 23:04:11 +0200 (CEST)

On Wed, 16 Jul 2014, Jim Leggett wrote:

You're not asking for libcurl details. You're asking about using the curl
tool, which is usually handled on the curl-users list.

> curl http://{site name}:80/SecureWebFtp/Uploads --header
> "Content-Type:multipart/form-data" --form
> "dealer=099990&password=TM95&uploadFile=HANDYORD&f ilerequest=ORDER"
> --verbose -# --write-out "HTTP upload successful!" --upload-file
> /keypos/ftpinout/HANDYORD http://{site name}/SecureWebFtp/Uploads/

1) Cut the --header option, --form implies multipart/form-data on its own

2) you want one --form for *each* part you want to send, including the file to
upload. So 4 or 5 something of them. See the man page for how --form works.

3) cut the --upload-file, see (2)

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-18