Allow reupload file on error on dropzone programatically
view.dropzone = new Dropzone(form[0], {
...
autoProcessQueue: false,
uploadMultiple: false,
parallelUploads: 100,
maxFiles: 1,
thumbnailWidth: 300,
thumbnailHeight: null,
previewsContainer: inputPreview[0],
clickable: inputClick[0],
acceptedFiles: 'image/*',
...
error: function(file, errorMessage, xhr) {
// Trigger an error on submit
view.onSubmitComplete({
file: file,
xhr: xhr
});
// Allow file to be reuploaded !
file.status = Dropzone.QUEUED;
// this.cancelUpload(file);
// this.disable();
// this.uploadFile(file);
}
});