D
David Laub
I'm trying to use the HTML file selection form "control" with a MIME type
accept filter. - see the following code snippet:
<input name="fileUpload" id="File" type="file" size="21" accept="image/*" />
I'm struggling at two levels:
1) mapping the MIME types (e.g. image) to actual file types (e.g. jpg) - I
have found "complete" lists on the net, but wonder how complete/up to date
they are - what I REALLY want to do is filter for Excel files: I can find
something for MSWord (e.g. MIME application/msword) but nothing for Excel)
2) here's the bigger problem: when I add the accept attribute to the input
tag, (usually) NOTHING happens when I display the HTML page - the browser
merely shows All Files in the files of type drop down list. Sometimes I DO
see pictures added to the drop down list, but when this happens I also get
HTML added to the drop down list, even through I did not specify it.
So if someone knows how to make the accept attribute work I'd be grateful.
And if someone knows how to fully map the accept values to "standard" file
types, I'd be even more grateful.
Thanks
David Laub
accept filter. - see the following code snippet:
<input name="fileUpload" id="File" type="file" size="21" accept="image/*" />
I'm struggling at two levels:
1) mapping the MIME types (e.g. image) to actual file types (e.g. jpg) - I
have found "complete" lists on the net, but wonder how complete/up to date
they are - what I REALLY want to do is filter for Excel files: I can find
something for MSWord (e.g. MIME application/msword) but nothing for Excel)
2) here's the bigger problem: when I add the accept attribute to the input
tag, (usually) NOTHING happens when I display the HTML page - the browser
merely shows All Files in the files of type drop down list. Sometimes I DO
see pictures added to the drop down list, but when this happens I also get
HTML added to the drop down list, even through I did not specify it.
So if someone knows how to make the accept attribute work I'd be grateful.
And if someone knows how to fully map the accept values to "standard" file
types, I'd be even more grateful.
Thanks
David Laub