curl-users
Re: Having trouble uploading a file using cURL
Date: Thu, 21 Jun 2001 16:17:37 +0200 (MET DST)
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