javascript - multiple fine-uploader complete callback -


i have upload page, has 2 fineuploader container, , 1 manual trigger upload button. shown in image

layout design
here upload button click event code:

$('#trigger-upload-namecard').click(function(){     $('#upload-csv-file').fineuploader('uploadstoredfiles');     $('#upload-jpg-files').fineuploader('uploadstoredfiles'); }); 

how can fire callback something, eg. console.log("all of them uploaded"), both 2 fineuploader has complete upload.
know fineuploader has option callbacks.onallcomplete, seem work each fineuploader individually.

im unsure if work can try jquerys whena nd then.

$('#trigger-upload-namecard').click(function(){     $.when(        $('#upload-csv-file').fineuploader('uploadstoredfiles'),        $('#upload-jpg-files').fineuploader('uploadstoredfiles')     ).then(        alert('all done!')    ); }); 

https://api.jquery.com/jquery.when/


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -