cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Https upload with curl

From: Chris Dawson <xrdawson_at_gmail.com>
Date: Mon, 24 Apr 2006 14:47:11 -0700

This is an example I use to make a POST of a file. I store
authentication in a cookie before I make the request, and then reuse
that cookie when I make the POST. The -H switch tells the client to
ignore a broken part of the SSL connection. The -F switches indicate
the fields in the form and their accompanying values. If you use a
value with @ at the beginning, curl sends the file referenced by that
path.

curl -b /tmp/1145820726.piab-cookies.tmp -c
/tmp/1145820726.piab-cookies.tmp -H Expect: -k -F episode[title]="Some
title -F episode[description]="Some description" -F
episode_mp3_file=@/foobar/items/1145820666.mp3
https://foobar.com/episode/create

Maybe that helps.

Chris

On 4/24/06, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 24 Apr 2006, kanakamahesh.anasuri_at_wipro.com wrote:
>
> > I am trying to setup download/upload files in to https server (using Apache
> > server 2.0 versions)
>
> Upload how? Using what request?
>
> > $ curl --cacert cacert.pem --upload-file sample2.txt
> > https://10.201.114.32:443/basic/
>
> This makes a PUT...
>
> > <title>405 Method Not Allowed</title>
>
> ... which the server doesn't allow to that URL.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2006-04-24