cURL / Mailing Lists / curl-users / Single Mail

curl-users

Need help with error encountered uploading

From: Hoog, Carl <Carl.Hoog_at_maritz.com>
Date: Tue, 20 Jul 2004 17:08:30 -0500

Shown below is the page with the form I'm trying to post to. I've modified the urls in this email.

<html>
 
<head>
<title>XXXXXXXX Upload Form</title>
</head>
 
<body>
<img src="../images/logo.gif">
<center>
 
 <hr>
 <h2>
  Please upload your files here.
 </h2>
 <hr><br>
</center>
<form enctype="multipart/form-data" action=" <https://dispatch.xxxxxxxxxx.com/scripts/cpshost.dll?PUBLISH> https://dispatch.xxxxxxxxxx.com/scripts/cpshost.dll?PUBLISH" method=post>
File to process: <input name="my_file" type="file"><br>
File to process: <input name="my_file" type="file"><br>
File to process: <input name="my_file" type="file"><br>
Destination URL: <input name="TargetURL" value=" <https://dispatch.xxxxxxxxxxx.com/users/destdir>
https://dispatch.xxxxxxxxxxx.com/users/destdir"><br>
<input type="submit" value="Upload">
</form>
</body>
 
</html>

 
This is the statement that I've tried to use to set a file name to upload and simulate pressing the "Upload" button. Again, I'm not showing the real userid or password for obvious reasons.

curl -v -u userid:password -F my_file=@test.txt -F submit="Upload" <https://dispatch.xxxxxxxx.com/users/> https://dispatch.xxxxxxxx.com/users/destdir

 I get a connection to the destination with no problem but the Upload fails. The following is an excerpt from the output from curl where I'm getting a "Method not allowed" error. What am I doing wrong?

 

* SSL certificate verify ok.
* Server auth using Basic with user 'userid'
> POST /users/destdir HTTP/1.1
Authorization: Basic TWFyaXR6RmFsbEZvY3VzOjlwdjgwUTEjMlA=
User-Agent: curl/7.11.1 (hppa2.0w-hp-hpux11.11) libcurl/7.11.1 OpenSSL/0.9.7d zlib/1.1.4
Host: dispatch.xxxxxxxxxxx.com
Pragma: no-cache
Accept: */*
Content-Length: 299
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------e0ddcd0dbaf3
 
< HTTP/1.1 100 Continue
< Date: Tue, 20 Jul 2004 21:16:10 GMT
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
100 299 0 0 100 299 0 1049 0:00:00 0:00:00 0:00:00 1049< HTTP/1.1 405 Method not allowed
< Date: Tue, 20 Jul 2004 21:16:10 GMT
< Connection: close
< Allow: OPTIONS, TRACE, GET, HEAD, PUT, DELETE
< Content-Length: 3923
< Content-Type: text/html
100 4222 100 3923 100 299 11240 856 0:00:00 0:00:00 0:00:00 56625
* Closing connection #0
 
 
 
Thanks for any insight you can provide.
 

Carl Hoog

Confidentiality Warning: This e-mail contains information intended only for the use of the individual or entity named above. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, any dissemination, publication or copying of this e-mail is strictly prohibited. The sender does not accept any responsibility for any loss, disruption or damage to your data or computer system that may occur while using data contained in, or transmitted with, this e-mail. If you have received this e-mail in error, please immediately notify us by return e-mail. Thank you.
Received on 2004-07-21