[whatwg] overriding MIME type in accept attribute?

On Tue, 6 Jul 2004, Hallvord Reiar Michaelsen Steen wrote:
>
> This part of the WF2 spec about the file upload: "accept" attribute
> seems a bit odd to me:
>
> > UAs may allow the user to override the MIME type to be one of the
> > allowable types if the file is originally incorrectly labeled (but
> > should not allow users to override the type merely to let
> > submission continue, as that would defeat the point of having a
> > restriction in the first place)
>
> How is the UA to allow the user to override a MIME type and how on
> earth is it supposed to know the user's motivation for doing so?

Something like:

  +---------------------------------------------------+
  | Pick file for upload                              |
  +---------------------------------------------------+
  | File:                                             |
  | +-----------------------------------------------+ |
  | | (os file picker goes here)                    | |
  | |                                               | |
  | |                                               | |
  | |                                               | |
  | |                                               | |
  | |                                               | |
  | |                                               | |
  | +-----------------------------------------------+ |
  | Send as: [ Image (PNG) |v]             ( Upload ) |
  +---------------------------------------------------+

...or something.


> Another issue: on Windows, if I try to upload a file with no extension,
> how is the UA supposed to work out what the MIME type is?  Content
> sniffing?

Probably.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 7 July 2004 07:04:46 UTC