W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2010

[whatwg] HTMLCanvasElement.toFile()

From: Darin Fisher <darin@chromium.org>
Date: Fri, 15 Jan 2010 00:36:26 -0800
Message-ID: <bd8f24d21001150036v6b6670bp257021c61d795bea@mail.gmail.com>
On Thu, Jan 14, 2010 at 11:04 PM, Ian Hickson <ian at hixie.ch> wrote:

> On Thu, 14 Jan 2010, Darin Fisher wrote:
> > On Thu, Jan 14, 2010 at 12:10 PM, David Levin <levin at google.com> wrote:
> > >
> > > It seems like it the method should be toBlob.
> > >
> > > > This doesn't address my concern that you won't know the mime type of
> > > > the blob returned.
> > >
> > > This makes a good case to move the "readonly attrbiute DOMString type"
> > > from File to Blob.
> >
> > I like this suggestion.  It seems reasonable for a Blob, which is just a
> > handle to data, to have an associated media type.
>
> What type should a blob have if it is the result of slicing another file?
>
>
I had the same thought after sending this ;-)

A slicing operation that changes the size of the file should probably clear
the type field or set it to application/octet-stream.  Perhaps Blob.type
should be settable in some cases?

-Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100115/0ddc9113/attachment.htm>
Received on Friday, 15 January 2010 00:36:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:20 UTC