cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Having trouble uploading a file using cURL

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Thu, 21 Jun 2001 13:16:43 -0400

If you're looking for alternative tools to ASPSimpleUpload, I highly
recommend Software Artisans' SAFileUp tool. They've got a nice array of
client tools (Java, ActiveX) that go along with it if you're doing any
serious file uploads. Otherwise, they also support standard Forms-based
uploads like you're trying. They've also got a reasonably good set of
documentation to show you how to use the tool. I am not related to the
company, just a happy user. http://www.softarts.com/

However, if you are able to successfully upload using a browser, but not
via curl, then the problem lies with curl (or your use of it).

My first guess is that you're possibly having file security issues. But
that's just a wild guess.

If you can send me the output from your latest attempt with curl
(include the -v and -i flags so I can see the whole picture), I would be
happy to attempt to help.

--Kevin

-----Original Message-----
From: HAMPY, CHAD (SBCSI) [mailto:ch2938_at_sbc.com]
Sent: Thursday, June 21, 2001 11:46 AM
To: curl_at_contactor.se
Subject: RE: Having trouble uploading a file using cURL

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