Re: [FileAPI] File.mediaType

Anne van Kesteren wrote:
> This should be a bit more exact as to how the mediaType is returned. I 
> would prefer ASCII-lowercase. 

Done.

> 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?
>
> Also, maybe we should just call this type? File.type seems unambiguous 
> enough.
>

"mediaType" is more specific than "type".

-- A*

Received on Friday, 13 November 2009 10:37:14 UTC