LukasMarx / angular-file-upload

MIT License
136 stars 88 forks source link

How to make it single file upload component #6

Open bkrajendra opened 5 years ago

bkrajendra commented 5 years ago

Really nice component. My backend code only handles single file upload. How can make it for just uploading single file.?

hbthanki commented 4 years ago

Remove multiple from html: <input type="file" #file style="display: none" (change)="onFilesAdded()" multiple /> or use Angular to make it configurable <input type="file" #file style="display: none" (change)="onFilesAdded()" [multiple]="multipleFlagInComponent" />

Note: I have not tested this but it should work I assume.