W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

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

From: Arun Ranganathan <aranganathan@mozilla.com>
Date: Tue, 22 Jan 2013 06:04:41 -0800 (PST)
To: Cyril Concolato <cyril.concolato@telecom-paristech.fr>
Cc: public-webapps@w3.org, Jonas Sicking <jonas@sicking.cc>
Message-ID: <74014092.7313565.1358863481009.JavaMail.root@mozilla.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:58 UTC