cURL / Mailing Lists / curl-users / Single Mail


RE: Troubles Posting...

From: Phippen, Neil <>
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

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

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


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


Thank you for your help
Neil M. Phippen
Research Assistant
Monterey Bay Aquarium Research Institute
7700 Sandholdt Rd. Moss Landing CA 95039
Phone: (831) 775-1745
-----Original Message-----
From: [] 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:

  Commercial curl and libcurl Technical Support:
Received on 2006-06-07