We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9c1839 commit b99e792Copy full SHA for b99e792
src/input-file.component.js
@@ -18,12 +18,11 @@ class InputFileComponent {
18
19
onInputChange(event) {
20
const files = event.target.files;
21
- this.ngModel = [];
22
- for (const file of files) {
23
- if (!file.type.match('image.*')) {
24
- continue;
25
- }
26
-
+ if (this.ngModel) {
+ this.ngModel.length = 0;
+ } else {
+ this.ngModel = [];
+ }
27
const fileLoaded = files.map(file => new Promise((resolve, reject) => {
28
const reader = new FileReader();
29
0 commit comments