Skip to content

How to unzip a file? #44

Answered by 101arrowz
Androz2091 asked this question in Q&A
Feb 28, 2021 · 1 comments · 15 replies
Discussion options

You must be logged in to vote

Sorry, this was a bug. I've published v0.6.5 which fixes the first bug, but I haven't experienced the second one. Can you try the following code? If it throws no error, try your previous code and if it still fails, send me your ZIP file. If this code throws an error, tell me what browser, version, OS, etc. you are running.

const uz = new Unzip();
uz.register(AsyncUnzipInflate)
const file = (await fetch('https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/models/3mf/truck.3mf')).body;
uz.onfile = (f) => {
    console.log(f); // this prints the file object successfully
    if (f.name != '3D/3dmodel.model' && !f.name.includes('.png')) {
        const decoder = new DecodeUTF8();

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@Androz2091
Comment options

@101arrowz
Comment options

@Androz2091
Comment options

@101arrowz
Comment options

@Androz2091
Comment options

Answer selected by Androz2091
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants