cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to POST a File to HTTPS via curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 23 Sep 2009 13:38:54 +0200 (CEST)

On Wed, 23 Sep 2009, Gius, Elif wrote:

> I searched the mailing lists and I found some good entries. But I couldn't
> still solve my problem. I appreciate any suggestions. I have to upload a
> file to a secure site. I'm trying following command:
>
> curl -v -k -d "v_csvInput=bla.csv" https://URL/TestUpload

This is a common request. And a common problem since you don't specify what
"upload a file" means more specificly. Most commonly you use multipart
formposts when uploading on "the web" which is what curl's -F option is for.
But PUT is the more HTTP-oriented way of doing "file uploads"...

> Description of remote site looks like this:
> <method name="TestUpload">
> <param name="v_csvInput" type="String" optional="false" />
> </method>

Well, that's not HTML so it doesn't really describe how the HTTP request
should look like. That looks like a writup for some other system, and how that
gets translated to HTTP is beyond what I know.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-09-23