Is there a way to specify the file types which can be accepted by HTML File Input/Upload dialog?
<input type="file" value="Upload XML file"/>
I wish to control that only certain file types are visible in the dialog based on their extensions.
Is there a way to specify the file types which can be accepted by HTML File Input/Upload dialog?
<input type="file" value="Upload XML file"/>
I wish to control that only certain file types are visible in the dialog based on their extensions.
Take a look at this answer -> File input 'accept' attribute - is it useful?
The accept attribute of input element was meant to provide mime-type filtering, however whilst the accept attribute exists within the RFC 1867, it would appear that the majority of browsers do not use this.
You will have to look for a JavaScript / Flash alternative, as suggested in the referenced post.