- From: Ian Hickson <ian@hixie.ch>
- Date: Mon, 12 Jul 2004 17:27:42 +0000 (UTC)
On Wed, 7 Jul 2004, Hallvord Reiar Michaelsen Steen wrote: > > Original: > > > The ERROR_TYPE_MISMATCH code is used to indicate that at least one of > > the selected files does not have a MIME type conforming to one of the > > MIME types listed as acceptable. 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). > > I suggest something like: > > File uploads are considered invalid if the selected file does not match > the accept attribute. The ERROR_TYPE_MISMATCH code is used to indicate > that at least one of the selected files does not have a MIME type > conforming to one of the MIME types listed as acceptable. UAs may allow > the user to select files that do not match the given MIME type for > upload, but the UA should warn the user before submitting the form that > the server expects a different file type and allow the user to interrupt > the submission in order to select a different file. I don't really understand the difference. Why is your text better? It may help to split the proposal into two, one saying what you want the new text to say that the old text doesn't (or vice versa), and one saying what you think should be improved purely for readability reasons. > (I'm not sure about the validity bit. Obviously it may be helpful if the > :invalid pseudoclass matches a file upload with a file selected by > mistake, but it sort of interferes with the normal form validation > process as there is no other case we permit the UA to say "I think this > field isn't valid but if you want I'll let you submit it anyway"!) Well, the field _is_ invalid, until the user corrects the MIME type, then it is valid. The UA must never submit the file with the wrong MIME type. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 12 July 2004 10:27:42 UTC