cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: upload text file and email address simultaneously using -T option?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 11 Mar 2007 23:35:48 +0100 (CET)

On Sun, 11 Mar 2007, Arvind Marathe wrote:

> http://predictdnahth.rutgers.edu/
>
> arvind_at_orion:/tmp$ curl -F
> upfile=@1RR7.pdb -F press=Send http://predictdnahth.rutgers.edu/

1) You post to the wrong URL
2) You don't provide all the fields in the form

Something in this style should work:

$ curl -F address=your_at_address -F upfile=@filename
http://predictdnahth.rutgers.edu/cgi-bin/upload2.cgi

> However if i try just file upload using the -T option (see below), it
> seems to accept it, but then it does not find the email address.

That form doesn't want a PUT, which is what -T sends. It wants a POST the way
-F does.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-03-11