How to clear dropzone.js dropzone?

by muriel.schmidt , in category: Javascript , a year ago

How to clear dropzone.js dropzone?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by elise_daugherty , a year ago

@muriel.schmidt 

To clear dropzone.js dropzone, you can use the removeAllFiles method. This method will remove all files from the dropzone and reset it to its initial state.


Here's an example of how you can clear dropzone.js dropzone:

1
2
3
4
var myDropzone = new Dropzone("#my-dropzone");

// To clear dropzone
myDropzone.removeAllFiles();


You can trigger this method when needed, such as when a "clear" button is clicked or after processing the uploaded files.

Related Threads:

How to get selected file path in dropzone.js?
How to preload images into dropzone.js?
How to limit upload files in dropzone.js?
How to submit dropzone.js with different buttons?
How to preload images using dropzone.js?
How to call name attribute for dropzone.js?