cURL / Mailing Lists / curl-users / Single Mail

curl-users

file upload

From: Golestan Radwan <radwan_at_terrasat.de>
Date: Fri, 5 Jan 2001 10:40:26 +0100

I'm writing an ftp upload utility and tried both curl and libcurl but
neither of them seem to work.
for curl, I'm using: curl -T uploadfilePath -u user:password -P ftp
ftp.machine.domain
but it just displays a DOS window which disappears before I can read what's
in it and when I check the ftp directory there's nothing uploaded!
with libcurl, I'm using the following from within an MFC application:
curl_easy_setopt(curl, CURLOPT_URL, char *url);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl, CURLOPT_INFILE, FILE *infile);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
curl_easy_setopt(curl, CURLOPT_USERPWD, char *usrpwd);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, char buf[]);

but I keep getting an error: Can't connect to server: 13

What am I doing wrong?
Received on 2001-01-05