W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Is BlobBuilder needed?

From: Glenn Maynard <glenn@zewt.org>
Date: Tue, 15 Nov 2011 10:55:25 -0500
Message-ID: <CABirCh9=Jzt+LZ2cm=JPQ_wWPtCeEgODrCVqyTaRKFO7s4GAmg@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Webapps WG <public-webapps@w3.org>, Eric Uhrhane <ericu@google.com>
On Mon, Oct 24, 2011 at 6:52 PM, Jonas Sicking <jonas@sicking.cc> wrote:

> It was pointed out to me on twitter that BlobBuilder can be replaced
> with simply making Blob constructable. I.e. the following code:

I noticed this at https://developer.mozilla.org/en/Firefox_8_for_developers:

"BlobBuilder now has a getFile() method that returns the content of the
blob as a file."

This suggests a File constructor as well, eg. b = new File([foo, bar], {
name: "file.jpg" });.

(Of course, the only difference is that the created object has the File
interface, with an attached filename.  It would make no difference to how
the data is stored, which isn't actually tied to the interface.)

Glenn Maynard
Received on Tuesday, 15 November 2011 15:56:03 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC