When a download fails, an SFTP client can easily resume the download by starting the transfer at the offset corresponding to the length of the file received so far. See here how to achieve this using Rebex SFTP (this is possible in most third-party SFTP clients).
However, FileServer
object's FileDownloaded
and FileUploaded
events are not called for incomplete transfers (transfers where the client session ended before the file has been closed). We will add an option to the next release that changes this behavior, making it possible to determine amount of bytes sent to the client (or received from the client) even for incomplete files. If you would like a beta build when it's ready, please let us know.
Note: In case of incomplete (or unclosed) transfers, the server knows how much data it sent to the client, but it cannot determine how much of that data has actually been received and saved by the client before a failure occurred.