cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Uploading Files

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sat, 5 Feb 2005 23:17:49 +0100 (CET)

On Sat, 5 Feb 2005, Nate wrote:

> So cURL can only upload files via http that exist LOCALLY.

curl is a client-side tool. It works from a client to a server. When you talk
http, you can only upload from local to remote. There's no other kind of
upload possible with this protocol.

So yes, curl can only do that.

> E.g. it could not display a multipart form on a website with a browse button
> where a remote user selects a file and then clicks a submit button to upload
> the file and cURL handles the entire process.

Uh? curl doesn't "display forms".

If a users selects a local file and clicks submit to upload, he/she uses a
browser to upload a file. That operation could be done with curl.

> But if the file was already on the server locally and I wanted to put it
> onto a different server I could upload it via cURL by using "curl -F

If you have the file stored and want to do a multi-part formpost, then curl -F
is indeed your friend!

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-02-05