I have a select option element in my project with two options, books and images. For book option, I want to allow only single file to upload. But for images option I need to allow multiple file selection. I am trying to this way but not succeeded:
Dropzone.options.frmMediaDropzone = {
maxFilesize: 99,
acceptedFiles: ".jpeg,.jpg,.png,.gif,.pdf",
parallelUploads: 1,
addRemoveLinks: true,
maxFiles: 100,
init: function() {
myDropzone = this;
this.on("removedfile", function(file) {
console.log(file);
});
this.on("success", function(file, response) {
console.log(response.imageName);
});
}
};
On option change, I am trying this:
Dropzone.options.frmMediaDropzone.maxFiles = 1;
But its not working. If anyone has idea please help.