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

Re: [FileAPI] File.mediaType

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 16 Nov 2009 10:36:04 -0800
Message-ID: <63df84f0911161036g2e561e6dwe446b276c63e16ea@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: arun@mozilla.com, WebApps WG <public-webapps@w3.org>
>>> Returning "application/octet-stream" rather than null also seems better
>>> if the type is not known. That way you do not have to type check. Other
>>> parts of the platform also handle "application/octet-stream" as unknown.
>> It's been pointed out that user agents type check on files.  If the
>> mediaType is not known, users invoking the attribute can't do anything
>> useful with it, so null is better.  What are the use cases for using
>> application/octet-stream instead?
> I guess not known might be useful. Can't we just make it the empty string
> then? I don't really see the need to return something other than a
> DOMString.

I agree an empty string is just as good here.

/ Jonas
Received on Monday, 16 November 2009 18:36:56 UTC

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