Overview
Features
Download
Documentation
Community
Add-Ons & Services

FTP : REST / resume an aborted transfer

Please post support and help requests here.

FTP : REST / resume an aborted transfer

Postby cdelmas » 21 Mar 2008, 11:53

Hello,
I would like to know how can I resume an aborted transfer (for instance, because the network comes down) using Poco FTP.

I have two solutions : use the command REST, along with the SIZE command or use APPE (append) to continue the transfer.

I think it should be possible to parameter beginUpload() with some parameter to use APPE or STOU instead of STOR (which would be the default op) for file store operation. Any suggestions ?

Code: Select all

std::ostream& beginUpload(const std::string& path, const std::string& operation = "STOR");
// operation can be one of STOR, APPE, STOU => enumeration ?


Thanks in advance.
cdelmas
 
Posts: 46
Joined: 22 Sep 2006, 10:04
Location: France

Re: FTP : REST / resume an aborted transfer

Postby cdelmas » 25 Mar 2008, 10:43

This is the code I wrote :
Code: Select all

// h
std::ostream& beginUpload(const std::string& path, const std::string& command = "STOR");

// cpp
std::ostream& FTPClientSession::beginUpload(const std::string& path, const std::string& command)
{
   delete _pDataStream;
   _pDataStream = 0;
   _pDataStream = new SocketStream(establishDataConnection(command, path));
   return *_pDataStream;
}
cdelmas
 
Posts: 46
Joined: 22 Sep 2006, 10:04
Location: France


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron