resume uploads using HTTP?

2019-01-24 02:02发布

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.

标签: http post upload
3条回答
地球回转人心会变
2楼-- · 2019-01-24 02:33

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楼-- · 2019-01-24 02:37

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.

查看更多
成全新的幸福
4楼-- · 2019-01-24 02:45

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

查看更多
登录 后发表回答