Re: Updates to File API

On Wed, Jun 2, 2010 at 3:44 PM, Arun Ranganathan <arun@mozilla.com> wrote:
> On 6/2/10 3:42 PM, Eric Uhrhane wrote:
>>
>> Arun:
>>
>> In the latest version of the spec I see that readAsDataURL, alone
>> among the readAs* methods, still takes a File rather than a Blob.  Is
>> that just an oversight, or is that an intentional restriction?
>>
>
> That's intentional; readAsDataURL was cited as useful only in the context of
> File objects.  Do you think it makes sense in the context of random Blob
> objects?  Does it make sense on slice calls on a Blob, for example?

Sure, why not?  Why would this be limited to File objects?

A File is supposed to refer to an actual file on the local hard drive.
 A Blob is a big bunch of data that you might want to do something
with.  There's nothing special about a File when it comes to what
you're doing with the data.

Just as we moved File.url up to Blob, I think File.readAsDataURL
belongs there too.

Received on Wednesday, 2 June 2010 22:49:29 UTC