jquery.fileDownload
jquery.fileDownload copied to clipboard
Multiple call of $.fileDownload invokes callback only one time
I call fileDownload by this
$.each(response.names, function (i, name) {
$.fileDownload('/Report/Download?name=' + name, {
successCallback: function () {
console.log(i, name, response.names.length);
},
failCallback: function () { alert("FAIL!!!") }
});
});
But in browser console I see only one log message. Maybe it's arcitecture decision to invoke callback one time?! It would be great to get callback invoked each times! Thanx
With jQuery-like done and fail handlers I've got callback invoked only on first iteration too.
I have the same problem, and is important that i can get the callback
this plugin isn't capable of watching for multiple file downloads at the same time because the same cookie is used for each. you will have to try something different if you want this to work reliably
hi, tanks for the info, i try this and work for me: document.cookie = "fileDownload=true; path=/"; $.fileDownload(combined).then(function() { $http.downSrcId = data.code; compressService.delete(); document.cookie = "fileDownload=false; path=/"; });