Re:Open Protocol for Resumable File Uploads
by irishsultan on Friday November 23, 2018 @06:58AM
(#18515916)
You still need to update all those old servers to stop ignoring the Content-Range and abort in it's presence.
Re:Open Protocol for Resumable File Uploads
by aaaaaaaaaab on Friday November 23, 2018 @11:47AM
(#18517469)
Or do a HEAD on the resource you want to resume uploading (this is recommended to find out how many bytes have actually went through) and if the response contains a "Accept-Range: true" header then the client can resume the upload.
KISS. Endow the "400 Bad Request" server response with a special header that acts like a cookie or nonce, with the semantics "this server does support Content-Range uploads and won't corrupt your resource". If the client resends the PUT + Content-Range request with the correct cookie/nonce added to it, it has acknowledged this semantics in turn, and the upload can now go through. This adds a roundtrip, but it's still trivial compared to what's being proposed here, and keeps the semantics of PATCH open for more complicated cases.