resume uploads using HTTP?

2019-01-24 02:31发布

问题:

Is it possible to resume interrupted uploads using HTTP Post? I am working on a project that uploads several files to a HTTP server. Thanks.

回答1:

Assuming you have control at a low enough level on both client and server sides of this project you could achieve this via Content-Range headers in your POST (or PUT) requests that send the data.



回答2:

Yes but it seems you have to use the HTML5 file API to slice the file into chunks: http://www.html5rocks.com/en/tutorials/file/dndfiles/#toc-slicing-files



回答3:

well some more info would be useful

Most easy is using http://resumablejs.com which uses

"HTML5 file API to slice the file into chunks" (as Timmmm said)


just btw - FTP can do this as well, but it might be disabled E.g. in ProFTP it is disabled by default and a common error is not enabling it ;), you would need to add

AllowStoreRestart on

to your proftpd.conf



标签: http post upload