Skip to content

Building an efficient zipfile explorer on Cloudflare #546

Discussion options

You must be logged in to vote

I don't know what could cause this issue but I can reproduce it with the code below and the last example of URL you mentioned. As you can see, it does not depend on zip.js at all. Maybe you should contact the support at Cloudflare because it looks like it's a bug.

export default {
  async fetch(request) {
    const url = new URL(request.url);
    const zipUrl = url.searchParams.get("url");
    try {
      const response = await fetch(zipUrl);
      const blob = await response.blob();
      return new Response("Processing complete", { status: 200 });
    } catch (error) {
      return new Response(`Error: ${error.message}`, { status: 500 });
    }
  }
};

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@gildas-lormeau
Comment options

Comment options

You must be logged in to vote
1 reply
@gildas-lormeau
Comment options

Comment options

You must be logged in to vote
1 reply
@gildas-lormeau
Comment options

Answer selected by CodeFromAnywhere
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gildas-lormeau
Comment options

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 #545 on December 08, 2024 08:44.