Discuss this help topic in SecureBlackbox Forum

FTPS: Download stream

To download some stream, use TElSimpleFTPSClient.DownloadStream() method to retrieve the file from a server and store it in a local stream. Note, that stream's Position will not be reset to 0 after downloading, so if you intend to read the data from the stream, you need to reset the Position to 0. You can download data to file streams or to any other streams this way.


TElSimpleFTPSClient FTPSClient = new TElSimpleFTPSClient();

MemoryStream ms = MemoryStream(Encoding.UTF8.GetBytes("Hello world"));
FTPSClient.DownloadStream(@"/remote/folder/file.txt", ms, TSBFileTransferMode.ftmOverwrite, 0);
ms.Position = 0;

FTPSCient := TElSimpleFTPSClient.Create(nil);
MS := TMemoryStream.Create;
FTPSClient.DownloadStream('/remote/folder/file.txt', MS, TSBFileTransferMode.ftmOverwrite, 0);
MS.Position := 0;

How To articles about client-side FTPS questions

Discuss this help topic in SecureBlackbox Forum