Browse - Programming Tips - html input type=file accept files by extension

Date: 2019nov11
Language: html
Keywords: upload

Q.  html <input type=file> accept files by extension

A.  The accept= attribute appears to want MIME types but recently, for uncommon types
(ie not JPEG) I have found that just the extension works best.
eg to only allow Photoshop files:
<input type='file' accept='.psd'>
Rather than
<input type='file' accept='image/vnd.adobe.photoshop'> WRONG
Or other MIME types.