Skip to content

ZIPs created via zip.js cannot be unzipped on older macOS versions with the default Archive Utility #468

Answered by gildas-lormeau
szbotms asked this question in Q&A
Discussion options

You must be logged in to vote

I updated the code in order to use the FS API.

Here is the code below:

<!DOCTYPE html>

<html>
  <head>
    <title>Test zip.js (FS)</title>
  </head>

  <body>
    <script type="module">
      import * as zip from "https://deno.land/x/zipjs/index.js";

      async function test() {
        // Generate ZIP file
      	const fs = new zip.fs.FS();
        const directory = fs.addDirectory("testdir");
        directory.addText("content.txt", "test content");
        const uint8Array = await fs.exportUint8Array({ 
          dataDescriptor: false 
        });
        
        // Download ZIP file
        const blob = new Blob([uint8Array], { type: "application/zip" });
        const link = docu…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gildas-lormeau
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
Converted from issue

This discussion was converted from issue #467 on December 08, 2023 13:24.