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 Chunking #42

Merged
merged 4 commits into from
Feb 6, 2024
Merged

Upload Chunking #42

merged 4 commits into from
Feb 6, 2024

Conversation

meksor
Copy link
Contributor

@meksor meksor commented Jan 31, 2024

Implements the chunking of bulk uploads and deletes in the api layer. Chunk size can be configured with settings.default_upload_chunk_size or IXMP4_DEFAULT_UPLOAD_CHUNK_SIZE.

NOTE: If an upload is interrupted between chunks the operation is not rolled back, so use it with care until the versioning system is in place.

I've also added some middleware to log the request size and process time. Seems like most request bodies are now max. around 1 Megabyte so i will probably set the webserver config to 2M max body size after this change is deployed (current is 50M).
IXMP4 will also now throw a verbose error if the webserver responds with a 413 (Payload too large).

@meksor
Copy link
Contributor Author

meksor commented Jan 31, 2024

PS: I bumped fastapi to 0.108.0 to make the size logging happen.

Copy link
Member

@glatterf42 glatterf42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@meksor meksor merged commit c6fd47c into main Feb 6, 2024
4 checks passed
@meksor meksor deleted the feature/upload-chunking branch February 6, 2024 10:34
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

Successfully merging this pull request may close these issues.

None yet

3 participants