Dropzone.options.dropzoneForm = {
autoProcessQueue: false,
uploadMultiple: false,
parallelUploads: 1,
maxFilesize: 3,
filesizeBase: 1024,
addRemoveLinks: true,
acceptedFiles: ".zip",
init: function() {
var myDropzone = this;
$('#upload-file').on('click', function(e) {
e.preventDefault();
myDropzone.processQueue();
});
this.on("complete", function() {
if (this.getQueuedFiles().length === 0 && this.getUploadingFiles().length === 0) {
this.removeAllFiles();
}
});
this.on("addedfile", function(file) {
if (this.files.length > 1) {
for (var i = 0; i < this.files.length - 1; i++) {
this.removeFile(this.files[i]);
}
}
});
},
success: function(file, response) {
window.location.href = response.url;
toastr.success(response.message, 'Success');
},
};