cURL / Mailing Lists / curl-users / Single Mail

curl-users

Having trouble uploading a file using cURL

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

I am trying to upload a TXT file to my IIS Web server using cURL.

The Facts:
I have never used CGI before so I am trying to use a object called
ASPSIMPLEUPLOAD

My Webpage Code:
        <%
         Dim upl, NewFileName
           
         Set upl = Server.CreateObject("ASPSimpleUpload.Upload")
          
         If Len(upl.Form("File1")) > 0 Then
             NewFileName = "/Uploads/" &
upl.ExtractFileName(upl.Form("File1"))
             If upl.SaveToWeb("File1", NewFileName) Then
                 Response.Write("File successfully written to disk.")
             Else
                 Response.Write("There was an error saving the file to
disk.")
             End If
         End If
         %>
           
         <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
Above is the code I was using but there was no way to point it to
Example1.asp

Please Help get me on the right track!
Chad Hampy
Received on 2001-06-21