EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Partial file downloads

Posted: 05/01/2015 16:41:17
by Amar  (Standard support level)
Joined: 05/01/2015
Posts: 7


I am new to secureblackbox api and was looking for a way to handle the below problem. If you have any knowledge article or sample then please let me know.

From a vendor SFTP site we download a number of files at specified time interval, sometimes if the file size is big the vendor upload process takes time to upload the file completely but from the SFTP client if the time interval is up, it connects and it tries to download this partially completed file. With the DownloadFile() method what we are seeing it that, the download is for the partially file only.
What I would like to know if is there a way that I can handle this situation by either waiting for the file to upload completely or resume the partial download process?

Posted: 05/01/2015 16:57:04
by Ken Ivanov (Team)


Thank you for contacting us.

If the uploading party and/or the SFTP server does not lock the file whilst uploading, I'm afraid there is no way to find out that the file is actually still being written to.

A common solution for this synchronization problem (which involves certain changes on the other party though) is uploading a file under a temporary name or to a different folder, and moving it to the appropriate location after the upload is complete. This change should be applied to the uploading party.

A partial solution would be to check the size and/or modification time of the remote file after downloading it locally and comparing to the relevant values checked before the download, but this solution is not robust enough.

Posted: 05/01/2015 23:51:22
by Eugene Mayevski (Team)

One small addition - SecureBlackbox lets you resume file transfers by offering Mode parameter in Download*() and Upload*() methods. One of the possible value is Resume, and this would let you continue the file downloading once the detected file size is increased.

Sincerely yours
Eugene Mayevski
Posted: 05/04/2015 09:05:36
by Amar  (Standard support level)
Joined: 05/01/2015
Posts: 7

Thank you for the reply. I will try the suggestions.



Topic viewed 793 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!