cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Troubles Posting...

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 7 Jun 2006 23:03:04 +0200 (CEST)

On Wed, 7 Jun 2006, Phippen, Neil wrote:

> I have been studying over the help page for the last few days, it seems to
> make sense but when I make this call:
>
> curl -b headers -F "file=C:\test.gif"

Note that this sends a part named 'file' with the text contents being
'C:\test.gif'. If you want to have the contents from the file named
C:\test.gif you need to write it:

   -F file=@C:\test.gif

> What should I look for if curl is successful?

The server responds a 200 HTTP code if the request is successful.

> Is this the proper way to submit a file on this form?
>
> <form method="POST"
> action="UploadServlet?folderName=%2fusers%2fneil%2fpublic%2
> fimages&amp;redirUrl=merspace2.jsp%3fuserFolderIndex%3d1"
> ENCTYPE="multipart/form-data">

With the little '@' trick above you should probably be fine.

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