W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: File API Feedback

From: Thomas Broyer <t.broyer@gmail.com>
Date: Tue, 30 Jun 2009 15:07:06 +0200
Message-ID: <a9699fd20906300607j17794a37j5e02961df843fe1a@mail.gmail.com>
To: Olli Pettay <Olli.Pettay@helsinki.fi>, WebApps WG <public-webapps@w3.org>
On Tue, Jun 30, 2009 at 2:25 PM, Olli Pettay wrote:
> On 6/30/09 1:44 PM, Ian Hickson wrote:
>> I'd rather just have an API that lets you split a File into a
>> sequence<FileData>  (where FileData is what File inherits from) of equally
>> sized chunks, or something like that, than something that lets you get
>> chunks out in particular forms.
> Yeah, that sounds better. Then XHR .send() could accept FileData as a
> parameter.
> All the .getAsXXX methods would move to that interface and there should be
> something like
> FileData getFileData(long long offset, long long length)

For the record, Gears' Blob (the almost-equivalent of that FileData if
I'm not mistaken) has a slice(offset,length) method:

(and a Blob can be passed to an HttpRequest's send() method, and
obtained from an HttpRequest's responseBlob property or in desktop's
openFiles callback; note that a File in Gears doesn't inherit Blob, it
rather has a 'blob' property of type Blob)

Thomas Broyer
Received on Tuesday, 30 June 2009 13:07:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:54 UTC