vue-dropzone
vue-dropzone copied to clipboard
Success multiple event triggers multiple times
I was trying to do some API requests after the uploading is finished and i noticed that @vdropzone-complete-multiple event is triggered multiple times.
<vue-dropzone ref="myVueDropzone" id="dropzone" :options="dropzoneOptions" :useCustomSlot="true" @vdropzone-complete-multiple="uploadComplete" />
Options:
dropzoneOptions: {
url: '/admin/files/upload',
thumbnailWidth: 200,
maxFilesize: 0.5,
uploadMultiple: true,
acceptedFiles: 'image/*',
renameFile: function (file) {
let newName = new Date().getTime() + '_' + file.name;
return newName;
},
headers: { 'X-CSRF-TOKEN': this.token }
}
Vue-Dropzone version: ^3.6.0