Hello all,
I am trying to find out how to allow users to only select certain files when the file browse window opens when an input
of type file is clicked. I couldn't come up with a solution for this. Any ideas? I thought the accept
attribute would work but I didn't get much luck with that, is the below implemented correctly?
<input id="file_zip" type="file" name="file_zip" accept="zip" />
Failing with the above, I have come up with a work around of getting the file name on change so I can do checks on it but this event fires only when something changes. A user can easily select the same file and continue without firing that event again! What event can I use instead?
Any help would be great!
$('#file_zip').change(function() {
alert($('#file_zip').val());
});