How to clear selected file in IE
Following example works in chrome but not in IE (Any version)
HTML
<input id="file1" type="file" class="" multiple="" required="" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
Jquery
$("#fileUpload").val('');
As expected IE does not support this.
I end up doing as below:
function reset_form_element(e) {
e.wrap('<form>').parent('form').trigger('reset');
e.unwrap();
}
and then called the function as below:
reset_form_element($('#file1'));