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

Progress is not working #21

Open
pisacode opened this issue Oct 20, 2022 · 0 comments
Open

Progress is not working #21

pisacode opened this issue Oct 20, 2022 · 0 comments

Comments

@pisacode
Copy link

When using the package with react and send a file from client side, progress just returns NaN.

I have cloned the repo and played around with the lib/upload.js and found and xhr event listener for progress never fires. I have tried different methods but couldn't get it to work.

Does any body have an idea how to fix this issues?

Related code

 var xhr = new XMLHttpRequest();

        xhr.upload.addEventListener(
          "progress",
          function (event) {
            if (event.lengthComputable) {
              loaded.set(event.loaded);
              total.set(event.total);
            }
          },
          false
        );
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

1 participant