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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -