cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Problem with Curl on Post - indicates Ok but file does not get uploaded

From: Brendan Lally <thelal_at_iname.com>
Date: Thu, 03 Jul 2008 12:47:21 -0600

Ralph

that worked - Thanks
Duh!

Lal

Ralph Mitchell wrote:
> On Thu, Jul 3, 2008 at 1:17 PM, Brendan Lally <thelal_at_iname.com
> <mailto:thelal_at_iname.com>> wrote:
>
> New to CURL
>
> following example at
> http://www.sitepoint.com/article/uploading-files-cgi-perl
>
> Have it running fine via browser and get files uploaded ok
> When run CURL it indicates its working ok (get Apache code 200 back)
> but fails to get the file uploaded and I get a copy of the HTML script?
>
> no errors in error log
>
> Ta
>
>
> Command i'm using is :
> curl -F fn=@x.txt -F submit=OK -v --show-error
> http://localhost/results/upload
> ....
>
>
> You need to be posting to the form action url, not to the form page. In
> other words:
>
> curl -F fn=@x.txt -F submit=OK -v --show-error
> http://localhost/cgi-bin/upload.cgi <http://localhost/results/upload>
>
> Ralph Mitchell
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-03