Reputation: 474
Is there a way to destroy or disable dropzone after the file uploads. I'm currently having an issue where the user can still drag and drop even after they have uploaded their file. I can't seem to find anything in their documentation. https://www.dropzonejs.com/
I've tried dropzone.off(); and dropzone.destroy() with no luck.
Upvotes: 0
Views: 3894
Reputation: 3259
The method you are looking for is .disable()
Here an example:
Dropzone.options.myDropzone = {
// other options
init: function() {
let mydropzone = this; // closure
this.on('success', function(file, response){
mydropzone.disable();
});
}
};
Upvotes: 2