javascript - Dropzone: Global Events and Custom Messages -


i searching solution handle own messages inserted sticky elements on top of page instead of dropzone ones according preview-template each file in dropzone-container.

my problem is, remove invalid files , when user selects 100 files , maximum 20 allowed, 80 files removed dropzone-container, 80 error messages blow screen. @ point, not interested file , why can't uploaded.

is there global dropzone-event called once if condtition true or possibilty handle this?

dropzone.on("complete", function (file) {     if (!file.accepted){         dropzone.removefile(file);         messages.showerror("some files not valid , have been removed ");     } }); 

i think looking maxfilesreached can

dropzone.on("maxfilesreached",  function (file) {         messages.showerror("some files not valid , have been removed "); ); 

but think dropzone sanctioned way set event in init

dropzone.options.dropzone = {   maxfiles: 20,   accept: function(file, done) {     console.log("all uploaded");     done();   },   init: function() {     this.on("maxfilesreached", function(file){          messages.showerror("some files not valid , have been removed   ");     });   } }; 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -