ZIPs created via zip.js cannot be unzipped on older macOS versions with the default Archive Utility #468
-
Hi, When a zip is created via zip.js and later tried to be opened on a user's machine which runs an older version of macOS, the default Archive Utility cannot unzip it as it results in an error. Any zip file created with the ZipManager demo is affected in the same way too. When unzipping it via the When
When looking at the original and the fixed zip via
Not sure if there's any other differences between the zip files as I could only extract this much information. Here are the files which I've tested with: I've tried to disable the Is there any way to get a resulting zip file which can be opened on these machines (so it matches the fixed zip file)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Could you tell me if the file generated by this test works? It weights 422 bytes. |
Beta Was this translation helpful? Give feedback.
-
I updated the code in order to use the 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 = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "test.zip";
link.click();
}
test();
</script>
</body>
</html> |
Beta Was this translation helpful? Give feedback.
I updated the code in order to use the
FS
API.Here is the code below: