
Gabriel F. answered 10/30/19
Tutor
5.0
(85)
Full Stack Software Developer and Mentor
Hi there. The "accept" attribute can be used to specify the types of files that can be uploaded as such:
<input type="file" accept=".gif,.jpg,.jpeg,.png>
This should be coupled with server side sanitization as well since there are ways to spoof the file type on the client side.
I hope this helps.