With HTML, how do I limit what kind of filetypes can be uploaded?
To easy the user experience, I want to limit file uploads to be only images (jpeg, gif, png).
<form method="post" action="..." enctype="multipart/form-data">
<label for="image">Photo</label>
<input name="image" type="file" />
</form>
HTML5 says <input type="file" accept="image/*">
. Of course, never trust client-side validation: Always check again on the server-side...