How to limit upload files in dropzone.js?

Member

by samara , in category: Javascript , 3 months ago

How to limit upload files in dropzone.js?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by dedrick , 2 months ago

@samara 

To limit the upload files in Dropzone.js, you can use the "maxFiles" option.


Here is an example code that limits the upload files to only 3:

1
2
3
Dropzone.options.myDropzone = {
  maxFiles: 3,
};


You can place this code inside your Dropzone initialization script to apply the limit. The "maxFiles" option specifies how many files are allowed to be uploaded.