cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp upload problem

From: Geoffrey E. Quelch <gequelch_at_frii.com>
Date: Thu, 31 Mar 2005 20:56:52 +0000

On Thursday 31 March 2005 8:46 pm, Daniel Stenberg wrote:
>
> And how are you sending the data? Using a callback? Does it get called and
> you return the proper return code?
>
I am following the example13 code (from curlpp) as closely as I can. In
summary:

curlpp::cleanup xfer;
curlpp::ftp_easy request;
request.verbose();

std::list< std::string > headerlist;
headerlist.push_back("RNFR " + shefout.getFilename());
headerlist.push_back("RNTO " + filename + "." + extension);

request.upload();

std::stringstream remote_url;
remote_url<<proto_name<<"://";

if((user.size() > 0) && (pw.size() > 0))
remote_url<<curlpp::escape(user)<<":"<<curlpp::escape(pw)<<"@";

remote_url<<host<<dir<<shefout.getFilename();

request.url(remote_url.str());

request.post_quote(headerlist);

curlpp::istream_trait my_trait(&hd_src); // hdsrc opened successfully earlier.
request.m_input_storage.trait(&my_trait, false);

request.infile_size(in_file.getSize());

request.perform();

> > curl-7.10.6-4.1
>
> This is VERY old stuff. Dinosaurs still walked the earth when that was
> relased.

Perhaps, but its the most "up-to-date" version supported in RedHat enterprise
linux which is the system i am developing on and for.

Thanks,
GEQ

-- 
Geoff Quelch
Email: gequelch_at_frii.net
Received on 2005-03-31