Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Andrea Desole
August 30, 2005, 4:26 pm
rate this thread
accept="text/xml", but that doesn't seem to work, with both Firefox and
IE (which is the browser I am writing the application for). The only
information I found tells me that browsers usually disregard the accept
attribute, for a reason that I absolutely can't understand. Accept is
part of HTML, and there is no reason for me not to consider it. Also,
specifying what files to show in an open dialog looks to me a perfectly
normal thing to do.
Can anyone explain this strange behavior, and if there is a solution for
Re: Why doesn't accept work in file upload controls?
You can't, in practice. See http://www.cs.tut.fi/~jkorpela/forms/file.html
Indeed. Besides, on the theoretical side, if it worked it would limit input
to files of media type text/xml, and that's not the only possible media
type for XML.
Read "usually" as "always".
Neither can I, but file input has in general been implemented in an awful
way. Now that the original specification of file input has become obsolete
and nothing better has been souped up, browser vendors have a good excuse
for not improving the situation. Besides, there's always XForms in the
horizon, and it will remove all the current problems with forms.
(Horizon = an imaginary horizontal line that draws away as you try to
Well, in a sense, but most file systems actually have no media type concept
in the sense that would be relevant here. There's nothing in the file
system that tells which files are XML files, for example. Using the
filename suffix as an indicator is a very coarse trick and works, at best,
for a limited set of media types - inconsistently, since there is no
specification of the correspondence.
Yucca, http://www.cs.tut.fi/~jkorpela /
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html