-
First of, thank you for this lib. I found this while browsing a zip64 feature request for the Conflux project. Anyway I have a large number of ~100 Mb files lets say a total of 40 Gb that i would like to stream to the client as a zip, but i can´t figure out how to achieve that. i have read some of your closed issues to try to get an idea but i cant seem to get it to work.
🙇 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You won't manage your 40GB download with the Blob approach (but the input generator is a good start). You absolutely have to stream the response (through a Service Worker, because that's the only way). There's a demo showing one way to do that. You can try it here and the source is also included in the repo. In that demo, client-zip is used in the Service Worker, not the client window. The window shows a button inside a form with The Service Worker intercepts the request and "respondsWith" the response generated by |
Beta Was this translation helpful? Give feedback.
-
The browser filesystem APIs should work here, assuming you want to stream straight to disk. However I haven't been able to actually get that working with client-zip. An example would be very much appreciated; just doing something like |
Beta Was this translation helpful? Give feedback.
You won't manage your 40GB download with the Blob approach (but the input generator is a good start). You absolutely have to stream the response (through a Service Worker, because that's the only way).
There's a demo showing one way to do that. You can try it here and the source is also included in the repo. In that demo, client-zip is used in the Service Worker, not the client window.
The window shows a button inside a form with
method=POST
andaction
pointing to an arbitrary same-origin URL. Unlike most forms these days, it does not prevent the default action because we want the browser to (try to) navigate to that URL, and we're using a form because it's a good way to add a request pay…