jszip icon indicating copy to clipboard operation
jszip copied to clipboard

Fix loading Blob in Node environment

Open UlyssesZh opened this issue 2 years ago • 4 comments

I fixed #899. The major problem is due to lack of FileReader in Node.

I also cleaned the logic of converting a blob into an array buffer. Note the fact: FileReader.prototype.readAsArrayBuffer and Blob.prototype.arrayBuffer essentially does the same thing, but the former uses callback while the latter uses promise. Also, because File inherits Blob, we do not need to specially take care of File.

npm run test seems fine. Tests all pass.

UlyssesZh avatar Jul 26 '23 06:07 UlyssesZh

Hello, I encountered the same problem and saw that you also experienced the same problem loading a blob in a Node environment. What is the status of this PR? I didn't see any conversation about the fix. Will it be merged soon into the main branch?

image

FatihBekdemir avatar Dec 30 '24 08:12 FatihBekdemir

You can use "jszip": "github:UlyssesZh/jszip#fix-node-blob" in package.json to use my fork.

UlyssesZh avatar Dec 30 '24 08:12 UlyssesZh

@jonkoops Hi I see that you started picking up the project. I'm happy to see that this project is now back on track. Could you please review this PR? I believe this may help with some CI problems.

UlyssesZh avatar May 07 '25 08:05 UlyssesZh

Yes, working on getting things back in shape. I will certainly try and find some time to look at this. Currently, I am knee-deep in wedding planning and my day job, but I will have a massive amount of PTO coming up that I intend to use to put some time into this.

jonkoops avatar May 08 '25 13:05 jonkoops