curl-users
RE: Troubles Posting...
Date: Wed, 7 Jun 2006 14:54:58 -0700
Thanks for the help thus far... This doesn't seem to actually submit the file... it says everything is well (HTTP 200) (I have tried this on a few file submission pages) but it does _not_ follow the submission link or upload any files... is there another command to make the submit field process?... or does -F "submit=Submit" do that? Sorry for being so needy, I feel like I'm on the verge of figuring this out but can't get over the edge...
------------------------------------------------------------------------
Neil M. Phippen
Research Assistant
Monterey Bay Aquarium Research Institute
7700 Sandholdt Rd. Moss Landing CA 95039
E-mail: nphippen_at_mbari.org
Phone: (831) 775-1745
-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se [mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Wednesday, June 07, 2006 2:03 PM
To: the curl tool
Subject: RE: Troubles Posting...
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&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.htmlReceived on 2006-06-07