Skip to content

Large files in a serverless/edge environment #472

Discussion options

You must be logged in to vote

Hi,

The problem is that zip.js needs some improvements regarding the handling of errors when using streams. Today, they are not propagated into the streams. So, you have to use the promises returned by zip.js APIs to detect errors. This issue makes the code less intuitive to write.

Here is below an example of code running in Deno which shows what you want to achieve. It creates a zip file on the fly with data coming from third-party servers. Normally, this code should be able to generate zip files with constant memory consumption.

import { serve } from "https://deno.land/std@0.210.0/http/server.ts";
import { ZipWriter, configure } from "https://deno.land/x/zipjs@v2.7.32/index.js";

serve(a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chrisyalamov
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