HTML <input type='file'> apply a filter

Viewed 76575
<input type='file' name='userFile'>

now when i will click the browse button, the browse dialog will show all files... what if i want to filter file types lets say

  • only images or .png & .jpg & .gifs
  • only office file like .doc & .docx & .pps

how to do it...

8 Answers
Related