curl-library
RE: Using ftpupload.c returns a directory listing in HTML format
Date: Thu, 13 Aug 2015 01:21:25 +0200
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
Received on 2015-08-13