Skip to content

C# file upload utility with auto resume feature

ganesh.raju

Asked Mar 10, 2005, 7:18 AM EST1 answer
Share
LinkedInX
Hi, How do i write a file upload utility tool with auto resume feature. I am more interested in knowing how can i do the 'auto resume' (to resume from where the file had stopped uploading) functionality. Thanks, Ganesh Raju

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    What is the upload target? A web site? A proprietary server? In a proprietary client / server environment, this is easy. You just devise a transfer protocol that supports the resuming of downloads. First, the protocol should tell the file recipient the size of the file and the client and server should agree on a segment size. Each segment should be relatively small, maybe 128 bytes to 1kb. Given the size of the file and the segment size, the recipient knows how many segments it needs to receive. It will ask the sender for each segment in any order it chooses. The sender must send whatever it is asked for. If there is disconnection in between, the recipient still knows which segments it has and which ones it still needs. Each segment should also contain its own checksum value to verify successful transmission. If it fails, it should re-request that segment. I'm not aware of any upload resuming protocols or standards for web uploads, but that doesn't mean that there aren't any.
    0