We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The zip file saved by firefox is incomplete. The following are files saved by Firefox: The file saved by chrome is correct.
this's my code:
export const downloadFileByFetchToZip = (fileName:string,files:downloadAnnexModel[])=>{ streamSaver.mitm= '/shtml/mitm.html' const zipFileOutputStream = streamSaver.createWriteStream(fileName+".zip"); const fileIterator = files.values(); const readableZipStream = new Zip({ async pull(ctrl) { const fileInfo = fileIterator.next(); if (fileInfo.done) { ctrl.close(); } else { const {fileName, fileUrl} = fileInfo.value; return fetch(fileUrl).then(res => { ctrl.enqueue({ fileName, stream: () => res.body }); }).catch((x)=>console.error("error",x)) } //ctrl.close() } }); if (window.WritableStream && readableZipStream.pipeTo) { readableZipStream .pipeTo(zipFileOutputStream) .then(() => console.log("done")).catch((error)=>{ console.log("error",error) }) } }
After the file is saved, the then block is not executed, and the catch block is not executed. It is not clear which link has gone wrong.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The zip file saved by firefox is incomplete.
The following are files saved by Firefox:
The file saved by chrome is correct.
this's my code:
After the file is saved, the then block is not executed, and the catch block is not executed. It is not clear which link has gone wrong.
The text was updated successfully, but these errors were encountered: