cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using ftpupload.c returns a directory listing in HTML format

From: Nils Söderman <nils_at_meditalk.com>
Date: Thu, 13 Aug 2015 11:24:57 +0200
Thanks Patrick!
I tried your way, at least I get another error message now!
"curl_easy_perform ()  failed: Upload failed (at start/before it took off)"
So how to rewrite my URLs so cURL accepts them. I begin to a bit desperate now, are there no debug/error printf() possible? ( I use -Wall ...)
Nils, wondering if the example worked to start with??

Den 2015-08-13 kl. 01:21, skrev Patrick Monnerat:
RE: Using ftpupload.c returns a directory listing in HTML format

Nils Soderman wrote:

Please don't top-post: http://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post

> My exact version of ftpupload.c is attached. Where is the problem hiding?

Your remote URL is a directory: it's thus impossible to overwrite it with a file. As the error says, this is a bad URL for uploading.
In other words, you forgot to name the upload destination file.

You probably have to change:

curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL);

into

curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL "/" UPLOAD_FILE_AS);

Patrick



-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2015-08-13