I wanted to calculate all selected files total size uploaded in dropzone.
Ex : if I selected 5 files each of size 2mb then it should return 10mb total size
I wanted to restrict if total size of all files is greater than limit.
Can anyone please help me in this I am really stucked.
you may need a full version of this function.
If you set
uploadMultiple: true
, below method runs just once when files dropped, no matter how many files. Usingsendingmultiple
is a little optimization since it runs just one time per queue, not for every single file.First get files uploaded successfully, then iterate through them and get size. You can then call disable() on the dropzone if the total exceeds a certain limit.