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.
C#:
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;
Delphi:
FTPSCient := TElSimpleFTPSClient.Create(nil);
...
MS := TMemoryStream.Create;
MS.Write(...);
FTPSClient.DownloadStream('/remote/folder/file.txt', MS, TSBFileTransferMode.ftmOverwrite, 0);
MS.Position := 0;