cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Using curl to test a file_upload CGI script

From: E. Mark Floyd <efloyd_at_jpl.nasa.gov>
Date: Mon, 13 Nov 2006 15:18:43 -0800

|<HTML <http://www.sitepoint.com/glossary.php?q=H#term_75>>
 <HEAD></HEAD>
 <BODY>
 <FORM ACTION="upload.cgi" METHOD="post" ENCTYPE="multipart/form-data">
 Photo to Upload: <INPUT TYPE="file" NAME="photo">
 <br><br>
 Your Email Address: <INPUT TYPE="text" NAME="email_address">
 <br><br>
 <INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form">
 </FORM>
 </BODY>
</HTML>

A friend pointed out to me Curl's way of handling the passing of a
file. I didn't realize there was an option for this.

This other question I have extends the scope of this mailing list (an
RTFM n00b will suffice). Without using Curl's command line, how would
this normally be done; that is, formatting the URL string to include
binary data in an GET/POST request?

Thanks,

- Mark
|
Daniel Stenberg wrote:

> On Mon, 13 Nov 2006, E. Mark Floyd wrote:
>
>> I have a file upload utility I would like to test out using Curl, but
>> I am not sure how to parameterize the file binary data in the
>> POST/GET request in Curl.
>
>
> Then show us the full <form> tag (and the related ones) of the html,
> and we can tell you a suitable command line.
>
Received on 2006-11-14