accept only file type html input type code example
Example: accept only image input file
<input type="file" name="myImage" accept="image/x-png,image/gif,image/jpeg" />
<input type="file" name="myImage" accept="image/x-png,image/gif,image/jpeg" />