Discuss this help topic in SecureBlackbox Forum

FTPS: Download files (low-level method)

To download the file, use Receive() method of TElSimpleFTPSClient class. This method is overloaded, i.e. it provides several ways of use.

The simpliest variant of Receive() method accepts only the remote file name as a parameter. One more variant of Receive() method receives the remote file name and starting and ending position in the remote file to retrieve as parameters. With these two variants the downloaded data is passed to the application using OnBinaryData event of TElSimpleFTPSClient class.

Other two variants of Receive() method besides the mentioned parameters accept the destination stream to store the remote data.

The progress of the download operation is reported using OnProgress event of TElSimpleFTPSClient class. The progress reported includes the currently downloaded amount of data and the total size of the file. Note, that total size is only reported when UseSIZECmd property of TElSimpleFTPSClient class is set to true, and when the server supports this command. Otherwise, Total parameter of OnProgress event will be 0.

To stop the operation without closing connection you can set Cancel parameter of the OnProgress event handler to true. This will stop the download and close the data channel.

How To articles about client-side FTPS questions

Discuss this help topic in SecureBlackbox Forum