robbederks / downzip

NPM library to enable client-side code to stream potentially large files into a zipped download
MIT License
35 stars 12 forks source link

"no file" failures when using with svelte-kit adapter-node #40

Closed rjwalters closed 1 year ago

rjwalters commented 1 year ago

relates to #39

I have managed to get files to download with the svelte-kit dev server (vite dev) but I get a "no file" failure when I use the same code on my production deployments...

The url comes back from downzip('process id', 'zip name', filedata[]) as "downzip/download-0"

rjwalters commented 1 year ago

I found this: about:debugging#/runtime/this-firefox

I was expecting to see more in the worker logs.. all I get is this:

DownZipServiceWorker] Error while piping data into zip: TypeError: NetworkError when attempting to fetch resource.

I do manage to get a working zip file on the local dev server despite seeing this error in the workers console

rjwalters commented 1 year ago

lots of wrong turns working on this... I'm now thinking the errors I was seeing were probably S3/CORS related... I spent some time trying to use the client-zip library because it was easier to debug and learned a lot more about web workers in the process, but I think I'm going to try to zip up bundles on the server side instead.