Comments (2)
Using response.arrayBuffer()
instead of response.blob()
makes it work.
from jszip.
I found this bug today. Here is a shorter reproducing sample:
npm i jszip
echo 'Hello World' > hello.txt && zip hello.zip hello.txt
node -e "require('jszip').loadAsync(new Blob([require('fs').readFileSync('hello.zip')]));"
/home/ulysses/temp/jszip-test/node_modules/jszip/lib/utils.js:479
new Error("Can't read the data of '" + name + "'. Is it " +
^
Error: Can't read the data of 'the loaded zip file'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?
at /home/ulysses/temp/jszip-test/node_modules/jszip/lib/utils.js:479:17
Node.js v18.16.0
Version info:
- Zip: 3.0
- Node.js: 18.16.0
- jszip: 3.10.1
from jszip.
Related Issues (20)
- zipobject internalstream method not present in type definition file
- Fortify scan finds Insecure Randomness vulnerability in jszip.js, line 11488
- Fortify scan finds HTML5: Overly Permissive Message Posting Policy in jszip.js line 11477 and 11504 HOT 1
- Using Jszip in Angular to export 1-2 MB files considerably slows down UI HOT 2
- linebreak issues in windows text files HOT 1
- Byte alignment of resulting zip archive
- Missing folders when trying to extract files which are compressed using native compression software of Windows HOT 1
- Unable to open docx file in Node
- Same zip different zipContents when loadAsync
- JSZip v3.10+ breaks in some sandboxed browser environment because dependency setimmediate breaks HOT 1
- Can we generate LF instead of CRLF
- Reading Folder Doesn't Work
- Large zip file breaks with loadAsync
- Math.random() usage
- Is jszip unmaintained? HOT 9
- Zipping 1GB+ and splitting to chunks is slow - is there a way to speed it up?
- Can't use ReadableStream from generateNodeStream in the PutObjectCommand of s3
- escape and unescape are deprecated
- Error: End of data reached
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jszip.