Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Back Response in Failure Callback #73

Open
jcope2013 opened this issue Nov 19, 2014 · 4 comments
Open

Getting Back Response in Failure Callback #73

jcope2013 opened this issue Nov 19, 2014 · 4 comments

Comments

@jcope2013
Copy link

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);
            });
@johnculviner
Copy link
Owner

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

@jcope2013
Copy link
Author

@johnculviner switching back to v1.4.2 didn't seem to work with either of those snippets either

@katiepekarek
Copy link

@johnculviner I am having the same issue as @jcope2013. Was this ever resolved?

@johnculviner
Copy link
Owner

Make sure you do it just like the example and the responses are similar in the success and failure cases. Otherwise not sure...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants