resume uploads using HTTP?
Solution 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.
Solution 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
Solution 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
0pcl
Updated on August 16, 2022Comments
-
0pcl almost 2 years
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.
-
Remy Lebeau over 14 yearsExcept that RFC 2616 does not define how to send partial content in a client request, only in a server response. If the client request had to pass through an HTTP proxy, for instance, the uploaded data may no work correctly if partially uploaded. Better to use FTP instead of HTTP for partial file transfers.
-
imaginaryboy over 14 yearsSection 9.6 (PUT) of the RFC contains this sentence: "The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not understand or implement and MUST return a 501 (Not Implemented) response in such cases." To me that implies that a proxy would need to pass that header through, no? At any rate, the thought had occurred to be because mod_dav supports ranges in PUTs for exactly this purpose.
-
0pcl over 14 yearsThanks for the reply! I am uploading files by multipart/form-data now, can I use Content-Range header with it? I also found something called multipart/byteranges, is it something I should use for resuming uploads?
-
sudo almost 9 yearsI'm surprised they haven't standardized some protocol for this!