On Wed, Jul 21, 2010 at 2:05 PM, Aryeh Gregor
<Simetrical+wikilist(a)gmail.com> wrote:
This is the right place to bring it up:
http://lists.w3.org/Archives/Public/public-webapps/
I think the right API change would be to just allow slicing a Blob up
into other Blobs by byte range. It should be simple to both spec and
implement. But it might have been discussed before, so best to look
in the archives first.
Aha, I finally found it. It's in the spec already:
http://dev.w3.org/2006/webapi/FileAPI/#dfn-slice
So once you have a File object, you should be able to call
file.slice(pos, 1024*1024) to get a Blob object that's 1024*1024 bytes
long starting at pos. Of course, this surely won't be reliably
available in all browsers for several years yet, so best not to pin
our hopes on it. Chrome apparently implements some or all of the File
API in version 6, but I can't figure out if it includes this part.
Firefox doesn't yet according to MDC.