[whatwg] overriding MIME type in accept attribute?

Ian Hickson ian at hixie.ch
Wed Jul 7 07:04:46 PDT 2004


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.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list