My input file with accepts: accept="image/gif, image/jpg, image/jpeg, image/png", is allowing to select other extensions
22:01 21 Jun 2014

I have a form to select images for a gallery, and I want to allow user to select only jpg,gif and png image formats.

And now, for testing, I change extension of a image to .bmp like "image1.bmp", and when I click in my input file to select a image, this "image1.bmp" is hidden, but If I select "show all files", this "image1.bmp" appears, and I can select this "image1.bmp" and send this image in my form. And Im inserting this image with this format on database.

This is normal using accept="image/gif, image/jpg, image/jpeg, image/png"??

Because what I wanted is to block all formats that are not gif,jpg or png.

I have this input file:


html image