Re: Resumable Uploads

Thanks for the replies!

Using PATCH with a custom media type is unfortunately not a viable solution
for browser based clients.  The XHR2 send interface [1] and File API [2]
are not flexible enough to perform the body wrapping without loading the
entire request body into memory. There is no way to stream body data other
than providing a file object (or a slice of it).

This makes specifying the enclosed byte-range in the request header the
most desirable option. So far we are abusing the "Content-Range" header for
this (and so does the YouTube API [3]).

So I'm wondering what you'd consider to be the lesser evil: Using
Content-Range for this, or creating a custom header?

Don't get me wrong, I really want a proper solution for this in the long
run and would love to help with specifying it, if it's an interesting
problem to solve with http2. But if such a solution can't be had today, I'd
still like to create a stopgap for now.

[1] http://www.w3.org/TR/XMLHttpRequest2/#the-send-method
[2] http://www.w3.org/TR/FileAPI/
[3]
https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol

--
Felix Geisendörfer (felixge.de)
Co-Founder, Transloadit (transloadit.com)

Received on Monday, 22 April 2013 07:58:29 UTC