Add promise never resolves #593
Unanswered
Gouvernathor
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You have to start consuming the readable before writing the data because const zipFileStream = new TransformStream();
const blobPromise = new Response(zipFileStream.readable).blob(); // <--
const zipWriter = new zipJS.ZipWriter(zipFileStream.writable);
await zipWriter.add("text.txt", new Blob(["Hello, world!"]).stream());
await zipWriter.close();
const zipFileBlob = await blobPromise; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here, the promise returned by the .add method never resolves.
Beta Was this translation helpful? Give feedback.
All reactions