Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 0eb02e6

Browse files
Merge pull request #23 from jogbbs/master
fix the problem that the event does not trigger when the same file na…
2 parents 617b655 + 0eb09ff commit 0eb02e6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

BlazorInputFile/wwwroot/inputfile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
return result;
2323
});
2424

25-
componentInstance.invokeMethodAsync('NotifyChange', fileList).then(null, function (err) {
25+
componentInstance.invokeMethodAsync('NotifyChange', fileList).then(function () {
26+
//reset file value ,otherwise, the same filename will not be trigger change event again
27+
elem.value = '';
28+
}, function (err) {
29+
//reset file value ,otherwise, the same filename will not be trigger change event again
30+
elem.value = '';
2631
throw new Error(err);
2732
});
2833
});

0 commit comments

Comments
 (0)