cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Post File to HTTPS via cURL at command line

From: Amy Petri <Apetri_at_geneoswealth.com>
Date: Tue, 14 Jun 2005 15:41:11 -0600

I don't know if I am supposed to supply the user name and password this way - it just seemed the easiest way to send it.
Yes I am supposed to do a multipart form upload.
I put the braces in the URL because I need to login to the initial site and post the file to the /incoming/ directory. So it is quite possible I put in incorrect syntax. ??

I have posted and recorded using LiveHTTPHeaders. Since I am unfamiliar with that utility can you point me in the right direction to 'converting' it to cURL?

Thanks so much for your quick response!
Amy
  ----- Original Message -----
  From: Daniel Stenberg
  To: curl tool talk
  Sent: Tuesday, June 14, 2005 3:08 PM
  Subject: Re: Post File to HTTPS via cURL at command line

  On Tue, 14 Jun 2005, Amy Petri wrote:

> For months I have been trying to figure out a command line cURL method of
> posting a file to a secure site. The file must be POSTed, and a user name
> and password are required to login. Can anyone tell me what my potential
> problem could be with the below command? Any help is greatly appreciated.
>
> curl -v -k -# -u username:password \
> https://www.somesite.com{/incoming/} \
> -F File=@/tmp/xmlfile.nrq \
> -A "Mozilla/4.0"

  Are you supposed to provide the user name and password like this?

  Are you supposed to do a multipart form upload?

  Why the {}-braces ?

  I suggest you first make the post manually with firefox and record the
  operation with LiveHTTPHeaders, then it is a piece of cake to make curl repeat
  it.

  --
    Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-06-14