[whatwg] Re: overriding MIME type in accept attribute?

Ian Hickson ian at hixie.ch
Wed Jul 7 08:10:52 PDT 2004


On Tue, 6 Jul 2004, Malcolm Rowe wrote:
>>
>> 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?
>
> Up to the UA. For example, if a file upload control had accept="image/*", a
> Windows-based UA could present a standard 'file open' dialog containing a
> list of all files matching that type (which, on a Windows machine, would
> probably be those files with file extensions that mapped to a matching MIME
> type).
>
> What the UA should not then do, IMO, is allow the user merely to change the
> file type in the dialog from 'Image Files' (or whatever) to 'All Files', and
> upload a differently-typed document. One possibility would be to present a
> warning dialog first, something like:
>
> "The file that you are trying to upload is a [Microsoft Word 8.0 Document],
> but the server has requested only [image] files. If you believe that this
> file really is an [image] file, you can override this warning.
>
> [Upload anyway] [Cancel]"
>
> (or something suitably mpt-filtered, anyway).

Disregard my previous reply on this thread. This is a much better
suggestion than mine.

-- 
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