javascript - multiple fine-uploader complete callback -
i have upload page, has 2 fineuploader container, , 1 manual trigger upload button. shown in image
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!') ); });
Comments
Post a Comment