Closed huuquyasb closed 6 years ago
I found it. init: function() { const dz = this; dz.on('removedfile', function (file) { console.log('file remove', file); }); }
Thanks dropzone 👍 🥇
The output name is removedFile not removedfile if you want to use the Angular events.
In my case, the (removedfile) is called after form submit also
My code upload.component.html
<dropzone [config]="config" (canceled)="cancelUpload($event)" (removedfile)="onFileRemoved($event)" [message]="'Click or drag images here to upload'" (error)="onUploadError($event)" (success)="onUploadSuccess($event)"></dropzone>
upload.component.ts
onFileRemoved(event: any) { console.log('Removed.'); console.log(event); }
Remove button version 6.1.0