EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Partial file downloads

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#33195
Posted: 05/01/2015 16:41:17
by Amar  (Standard support level)
Joined: 05/01/2015
Posts: 7

Hi,

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?

regards,
#33196
Posted: 05/01/2015 16:57:04
by Ken Ivanov (EldoS Corp.)

Hi,

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.

Ken
#33198
Posted: 05/01/2015 23:51:22
by Eugene Mayevski (EldoS Corp.)

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
#33220
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.

Reply

Statistics

Topic viewed 621 times

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




|

Back to top

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

Got it!