Discuss this help topic in SecureBlackbox Forum

FTPS: Upload stream

To upload some stream, use TElSimpleFTPSClient.UploadStream() method to send a stream to a server and store it as a remote file. Note, that stream's Position must be set to 0 (or other position from which the data will be read) before calling UploadStream(). You can upload file streams or any other streams this way.

C#:


TElSimpleFTPSClient FTPSClient = new TElSimpleFTPSClient();

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

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

How To articles about client-side FTPS questions

Discuss this help topic in SecureBlackbox Forum