Renewable file upload protocol

I am going to write an application server (RESTFull API) so that clients can download a zip file, but the requirement is that the download should be resumed (due to a network failure / disconnection).

Is there any special protocol for this?

If yes, please share some information about this, I can’t even find anything on Google. I am trying to do this in Java (jersey). thanks

+4
source share
1 answer

There is no special protocol you need to know about renewable downloads. HTTP defines the "Range" header. Clients use the Range header to indicate which parts of the file they want to download.

Renewable downloads are implemented by tracking the parts of the file that you downloaded, and if they were interrupted, resume when you stopped.

On the server side, you usually only need to worry about whether the asset being served is dynamic or static.

If it is static, the solution is usually as simple as making sure your web server (Apache or something else) has a Range header and the client is turned on.

If it is dynamic, you need to check for the range header in the incoming HTTP request, and then make sure that you are serving only the requested portion of the asset. There are some additional things to consider, such as version control, caching, etc., which I will not go into, but I hope you get this idea.

Hope this helps!

+8
source

All Articles