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

Upload Endpoint file reading #564

Open
1yam opened this issue Apr 15, 2024 · 0 comments
Open

Upload Endpoint file reading #564

1yam opened this issue Apr 15, 2024 · 0 comments

Comments

@1yam
Copy link
Collaborator

1yam commented Apr 15, 2024

On : Storage Endpoint

Problem Description:
The current implementation of the file upload endpoint reads the entire file before checking if it exceeds the maximum allowed size for unauthenticated uploads (MAX_UNAUTHENTICATED_UPLOAD_FILE_SIZE = 25 * MiB) or (MAX_UPLOAD_FILE_SIZE = 1000 * MiB) for authenticated uploads.

Impact:
This leads to unnecessary memory usage and potential performance degradation, especially with large files or high volumes of traffic, which could risk server stability.

Suggested Improvement:
The file size should be checked against the maximum allowed size before the file is fully read into memory to prevent these issues.

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