Skip to content
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

Why not directly append chunks to the stored file instead of in-memory? #95

Open
blattms opened this issue Apr 24, 2023 · 0 comments
Open

Comments

@blattms
Copy link

blattms commented Apr 24, 2023

Is there a special reason why a file is build in-memory from the chunks? It seems like this could make a server run out of memory for many concurrent large uploads.

Wouldn't it work to create an empty resulting temporary file, open that in binary append mode, and then read each chunk and write/append it to the temporary file? This would only keep one chunk in memory and not all of them (plus one) at peak usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant