Reset upload input so the same file can be selected again

This commit is contained in:
Pavel Djundik 2019-08-25 20:14:46 +03:00
parent 16d070c19e
commit 04e1e004da

View File

@ -85,6 +85,7 @@ class Uploader {
filesChanged() { filesChanged() {
const files = Array.from(this.uploadInput.files); const files = Array.from(this.uploadInput.files);
this.triggerUpload(files); this.triggerUpload(files);
this.uploadInput.value = ""; // Reset <input> element so you can upload the same file
} }
triggerUpload(files) { triggerUpload(files) {