angular-file-upload icon indicating copy to clipboard operation
angular-file-upload copied to clipboard

nv-file-select selection of same file after removing it does not work

Open JuHwon opened this issue 10 years ago • 6 comments
trafficstars

Should the isEmptyAfterSelection function in the src/services/FileSelect.js really only be dependent on the multiple attribute? I e.g. need to reset the input field without the multiple attribute after selection.

I got a input element with the nv-file-select attribute like this

    <input id="upload-input"
           ng-disabled="vm.uploader.isUploading"
           type="file"
           accept=".ext"
           nv-file-select=""
           uploader="vm.uploader">

When i have selected the file foo.ext and then i am removing it with item.remove(); it is not in my queue anymore. Though the input element still has the value foo.ext. So when i want to select this file again because i have removed it accidentally - it wont work since the change event will not be thrown.

JuHwon avatar Nov 20 '15 13:11 JuHwon

having similar issue, any workarounds?

leguin avatar Jan 07 '16 20:01 leguin

I found the solution the follow link: https://github.com/nervgh/angular-file-upload/pull/357 Just update the angular-file-upload.js or you can add additional condition (https://github.com/nervgh/angular-file-upload/pull/357/files)

leguin avatar Jan 08 '16 06:01 leguin

This fix which reset the value of the input element doesn't work in IE10, and probably other versions of IE. Any idea of the correct way to fix this in IE ?

tomahim avatar Jun 16 '17 15:06 tomahim

Take the latest version of angular-file-upload.js. It has the fix for IE

MahikanthNagY avatar Feb 02 '18 10:02 MahikanthNagY

https://github.com/nervgh/angular-file-upload/wiki/FAQ#4-no-file-chosen-or-re-add-same-file

ismailarilik avatar Apr 07 '19 12:04 ismailarilik

This worked for me: https://github.com/nervgh/angular-file-upload/issues/322#issuecomment-66536876

ismailarilik avatar Apr 07 '19 12:04 ismailarilik