'pause and resume http file upload/download

I have 2 servers, one local server(office) another remote server in cloud (storage), users in the office can't access the remote server.

I want to create some upload/download web applications on a local server that users can upload/ download files to/from a storage server.

For more explanation, Users uploads file to local server to check some conditions then local server sends it to storage server, download is same as upload but in opposite direction, users request file from local server to download in from storage server.

I created a simple application using php Curl to do this. but I want some extra functionality like progressbar, pause, resume, cancel and auto-resume (when connection is dropped either in local network or remote).

How can I reach this using php-jquery or python flask or any better solution.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source