I want to filter files user can select into <input type='file'>
So I wrote :
<input class="form-control" accept="video/*" name="my_video" id="my_video" type="file">
for video
and <input class="form-control" accept="image/*" name="my_picture" id="my_picture" type="file">
for an image
I do tests with Linux browsers :
- Firefox 53.0 (64 bits)
- Chromium 58.0.3029.81 (64-bit)
both do not filter file types.
I looked around on stackoverflow. Syntax seems good. But even examples from that discussion does not work for me.
I checked on MDN as well. Nothing to help me.
I also tried to put directly file extension like accept="png"
accept=".png"
, accept="*.png"
. With same result.
Does someone have a clue to make accept
parameter work?