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

Issue: Zip doesn't work? #7

Closed
paambaati opened this issue Oct 3, 2020 · 2 comments
Closed

Issue: Zip doesn't work? #7

paambaati opened this issue Oct 3, 2020 · 2 comments

Comments

@paambaati
Copy link

paambaati commented Oct 3, 2020

I tried using the latest version of fflate, and I can't seem to get the zip() method to work.

Example CSB
https://codesandbox.io/s/fflate-zip-files-yuu21

Steps to reproduce

  1. Go to the linked CSB.
  2. Open the console and click on 'Upload Files'.
  3. Select a few files.
  4. Now watch the console not print any of the lines after zip() is called.

Additional context
I wrote a simple Promise wrapper around the callback-based zip() method so it is easier to make them work in async/await flows.

@paambaati paambaati changed the title Issue: Zip doesn't work Issue: Zip doesn't work? Oct 3, 2020
@101arrowz
Copy link
Owner

You can't use raw ArrayBuffer, you need to wrap in a Uint8Array. It seems to work for me after changing that, can you confirm?

@paambaati
Copy link
Author

You’re right, I did get it to work once I cast the ArrayBuffer to an Uint8Array.

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

2 participants