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

call done() not working #155

Open
yosua28 opened this issue Mar 28, 2018 · 4 comments
Open

call done() not working #155

yosua28 opened this issue Mar 28, 2018 · 4 comments

Comments

@yosua28
Copy link

yosua28 commented Mar 28, 2018

why every download, done() never called but fail() is called.

@BobLuo
Copy link

BobLuo commented Apr 11, 2018

I guess that you don't set cookie in you dowanlod file server.

Set-Cookie: fileDownload=true; path=/

@micky2be
Copy link

When is the cookie need to be set? Why does the server need to set it?

@micky2be
Copy link

When setting the cookie done get called when it's not supposed to

@topcss
Copy link

topcss commented May 22, 2019

me too, call successCallback() not working.

demo.zip

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="http://jqueryfiledownload.apphb.com/Scripts/jquery.fileDownload.js"></script>
  </head>
  <body>
    <script type="text/javascript">
      $.fileDownload(
        "http://jqueryfiledownload.apphb.com/FileDownload/DownloadReportPost",
        {
          httpMethod: "POST",
          data: "foo=42&bar=Some text&yesno=Yes&fib=0",
          successCallback: function(url) {
            alert("File download a success!");
          },
          failCallback: function(responseHtml, url) {
            alert("File download failed!");
          }
        }
      );
    </script>
  </body>
</html>

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

4 participants