I know how to validate this client and server side by extension and MIME type. That's fine, implemented, ready to go.
What I want to do is in the file upload dialog there is the li开发者_如何学Gottle drop down list that by default shows "All Files." I have seen similar controls in other sites and programs that effectively sort the directory for the user by the different options in the drop down ( just music files or just images, sometimes with the "All Files" option, sometimes not) and limit the user from seeing any file that isn't in the list.
How do I do that?
There is not a consistent way to accomplish this the way you are wanting to without adding dependencies.
You may be able to make use of the accept attribute of the input tag, but browser support for this is lacking. See this question for more information.
精彩评论