cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Having trouble uploading a file using cURL

From: HAMPY, CHAD (SBCSI) <ch2938_at_sbc.com>
Date: Thu, 21 Jun 2001 10:46:29 -0500

First off, Thank you for the quick response!

I did get a response from the page with the new command string below, but
the object is still not recognizing the form information. I am going to
look into setting up a CGI script/Page to upload to the server. Could
someone point me to either a good example or documentation on how to setup a
CGI upload using IIS 5?

Chad Hampy

-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]
Sent: Thursday, June 21, 2001 9:18 AM
To: Curl Mailinglist
Subject: Re: Having trouble uploading a file using cURL

On Thu, 21 Jun 2001, HAMPY, CHAD (SBCSI) wrote:

> I have never used CGI before so I am trying to use a object called
> ASPSIMPLEUPLOAD

I know totally nothing about ASP so I can't help you on that part.

> <html><head><title>ASP Simple Upload Example
> #1</title></head></title>
> <body>
> <form method="POST" action="Example1.Asp"
> enctype="multipart/form-data">
>
> Select a file to upload: <input type="file" name="File1" size="30">
> <input type="submit" name="submit" value="Upload Now">
> </form>
> </body>
> </html>
>
> Location of page:
> myserver.com/upload/Example1.asp
>
> Explanation:
> I am willing to ditch all of this work and try something new to get it
> working. Manual web-upload to the page works but I just cant seem to get
it
> to work with cURL.
> curl -F File1=@c:\temp\Drives.txt -F press=Submit myserver.com

The correct commnad line to upload to that form should look something
similar
to:

 curl -F File1=@c:\temp\Drives.txt -F "submit=Upload%20Now" \
  myserver.com/upload/Example1.asp

> Above is the code I was using but there was no way to point it to
> Example1.asp

The curl command line must point out the exact URL to upload to.

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
Received on 2001-06-21