curl-users
RE: Additional parameters with -F
Date: Mon, 29 Jul 2002 11:11:30 +0200
Form:
<form autocomplete="off"
action="http://kuwait:8000/servlet/PrivateDB.UploadDocumentsServlet"
encoding="multipart/form-data" method="POST" name="loginform">
<input type="hidden" name="Instance" value="0">
<input type="hidden" name="DefaultAction" value="SendDocument">
<input type="hidden" name="EditDocument.y" value="7">
<input type="hidden" name="EditDocument.x" value="32">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td height="10" class="formHeader"><b>User Name</b></td></tr>
<tr><td><input type="Text" name="UGA_UserName" maxlength="30" value=""
size="15"></td></tr>
<tr><td height="12"></td></tr>
<tr><td class="formHeader"><b>Password</b></td></tr>
<tr><td><input type="PASSWORD" name="UGA_Password" maxlength="30"
value="" size="15">
<input type="image" border="0" value="Go" name="Go"
src="/icons/DSWebRouter.Router.go2.gif" align="absmiddle">
</td></tr>
<tr><td height="15"></td></tr>
<tr><td class="formHeader"><b>File Name</b></td></tr>
<tr><td><input type="file" name="UGA_File" value=""
size="15"></td></tr>
<tr><td height="15"></td></tr>
</table>
</form>
Command:
/usr/local/bin/curl -c /tmp/aNewCookieJar -F UGA_UserName="aUser" -F
UGA_Password="aPassword" -F UGA_File=@/tmp/aFile -F
ReturnTo="javascript:self.close()"
http://kuwait.krinfo.ch:8000/servlet/PrivateDB.UploadDocumentsServlet
ReturnTo (which does not appear in the form) does not get passed. With -d,
and urlencoding, it does; but then you cannot have the file field.
Thanks,
-- Fernando D. Mato Mira matomira_at_acm.org The Dialog Corporation GmbH www.dialog.com E-MAIL NOTICE: This message (plus any attachments) is confidential and may be subject to lawyer-client privilege. Use without permission is strictly prohibited. -----Original Message----- From: Daniel Stenberg [mailto:daniel_at_haxx.se] Sent: Sunday, July 28, 2002 7:51 PM To: Matomira, Fernando Cc: Curl Mailinglist Subject: Re: Additional parameters with -F On Wed, 17 Jul 2002, Matomira, Fernando wrote: > I have a form which I multipart-encoded so that I could add a file input > field. > -F works OK, except that the additional parameters not appearing as input > fields in the form now get lost (it was OK with -d). ... and it works when you fill them in with a browser? So can you show us how the HTML for the form looks like and how the curl command line looks like? -- Daniel Stenberg -- curl groks URLs ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=3D31Received on 2002-07-29