-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite zip extraction code to use Buffer in upload.socketRoutes.ts #691
Comments
Random blog post: https://blog.logrocket.com/best-methods-unzipping-files-node-js/ |
@greenscientist What if we instead just used the standard |
@davidmurray, we usually don't know what is installed on the system. Also, the code can run on any OSes. We sould need to add this as a requirement in the installation. |
good point |
This does it using a stream rather than loading all files into RAM at once. Fixes chairemobilite#691
This does it using a stream rather than loading all files into RAM at once. Fixes chairemobilite#691
This does it using a stream rather than loading all files into RAM at once. Fixes chairemobilite#691
This does it using a stream rather than loading all files into RAM at once. Fixes chairemobilite#691
The code in packages/transition-backend/src/api/upload.socketRoutes.ts extract the zip file by read all the content into a variable in memory and then writing the content in a file.
We should be using buffers in this case, to not reach the variable size limit and save some memory.
We could also switch to a package which does it completely transparently.
The text was updated successfully, but these errors were encountered: