cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Troubles Posting...

From: Phippen, Neil <nphippen_at_mbari.org>
Date: Wed, 7 Jun 2006 13:51:08 -0700

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" -F "submit=Submit" "ht
tp://134.89.12.106:8088/mer-app/upload.jsp?folderResourceName=%2Fusers%2Fneil%2F
public%2Fimages&folderDisplayName=Images&userFolderIndex=1"

It just spits out the HTML for that page... It makes no note of dealing with the form....

What should I look for if curl 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/for
m-data">

  <table style="border: 1px solid #6666ff; width:80%; " class="contentTable">
   <tr>
    <th align="right" width="80" class="cellHead">folder:</th>
    <td class="contentCell">Images</td>
   </tr>
   <tr>
    <th align="right" width="80" class="cellHead">file:</th>
    <td class="contentCell2"><input class="contentInput" style="width: 100%;" ty
pe="FILE" name="file"/></td>
   </tr>

  </table>

  <input type="submit" class="contentButton" style="margin: 40px;" name="submit"
 value="Submit"/>
  <input type="button" class="contentButton" style="margin: 40px;" name="back"
value="Back" onclick="go_back()"/>

 </form>

Thank you for your help
------------------------------------------------------------------------
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 1:31 PM
To: the curl tool
Subject: Re: Troubles Posting...

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

> --This logs me into my application, now I would like to POST using a form
> found inside... the call I have given it is...

How is the HTML for this form? File upload forms are typically multi-part and
then you should use -F instead of -d ...

> Can anyone shed some light on the proper structure for making this sort of
> call?

Yeps, this little docs can:

         http://curlm.haxx.se/docs/httpscripting.html

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