.NET FtpWebRequest: How to check if file is ready to download -


i have service .net using ftpwebrequest download images ftp server. have camera stores images on same ftp server.

if service see image , tries download before camera has finished storing same image, 'not-yet-stored-part' of image appears grey (corrupted).

question: how detect whether image ready download (stored completely)?

if had control on sending service, implement using marker files. if sending service e.g. write ".finished" file when it's done, wait file appear.

however, suspect not have control on software in camera. there few issues detecting whether camera has finished uploading, slow internet connection.

i think best solution check changes in file size. monitor folder , see whether new files appear. then, if file size has not changed e.g. minute, should safe download file.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -