Getting Back Response in Failure Callback
This below code shown in the blog post doesn't work for some reason related to promise callbacks, neither get triggered properly after a successful file download
$.fileDownload('some/file/url')
.done(function () { alert('File download a success!'); })
.fail(function () { alert('File download failed!'); });
also successCallback & failCallback both get triggered on a successful file download and neither have the response available, is there any way to do a more traditional jquery ajax call, something like this
$.fileDownload(url, options).then(function(data) {
console.log("File download a success!" + data);
}, function(response) {
console.log("File download failed!" + response);
});
Hmm it could be related to the last PR I did. I can take a look here for now try using the previous file version
@johnculviner switching back to v1.4.2 didn't seem to work with either of those snippets either
@johnculviner I am having the same issue as @jcope2013. Was this ever resolved?
Make sure you do it just like the example and the responses are similar in the success and failure cases. Otherwise not sure...