Re: [File API] About Partial Blob Data, XHR and Streams API

Hi Cyril, 

1) I'm wondering why in progressive mode, does the spec say: " partial Blob data is an ArrayBuffer [ TypedArrays ] object consisting of the bytes loaded so far ". Why isn't it the bytes loaded since the previous progress event? 

AR: It is always a new ArrayBuffer. The phraseology "so far" could be replaced by "bytes loaded since the previous progress event" though I'm not always sure that will be the case. 

> In my use case, the binary data resource might have an infinite size,
> in which case the result objects will grow forever.
> I looked at the Streams API [1] to see if there was any difference
> for that but I couldn't see any. Reading with the FileReader
> interface a Stream (dynamic length) or a Blob (fixed length) seems
> to always return the whole content.
AR: Here, do you mean, you never get a progressevent other than load and loadend in your tests? Certainly, if you had binary data of infinite size, you'll get .... several.... result objects. The file API, particularly FileReader, shouldn't be used in streaming scenarios. 

-- A* 

Received on Tuesday, 22 January 2013 14:05:10 UTC