Skip to content

Add max_part_size parameter to MultiPartParser#2815

Merged
Kludex merged 11 commits intoKludex:masterfrom
iudeen:fix-multi-part
Dec 28, 2024
Merged

Add max_part_size parameter to MultiPartParser#2815
Kludex merged 11 commits intoKludex:masterfrom
iudeen:fix-multi-part

Conversation

@iudeen
Copy link
Contributor

@iudeen iudeen commented Dec 26, 2024

Fixes #2785

Also addresses issue discussed in FastAPI Repo.

Comment on lines 132 to 133
max_file_size: int = 1024 * 1024, # 1MB
max_part_size: int | float = 1024 * 1024, # 1MB
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we remove defaults here and keep the default at top most function?

Copy link
Owner

Choose a reason for hiding this comment

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

This is okay.

@iudeen iudeen requested a review from tiangolo December 26, 2024 12:32
Comment on lines 132 to 133
max_file_size: int = 1024 * 1024, # 1MB
max_part_size: int | float = 1024 * 1024, # 1MB
Copy link
Owner

Choose a reason for hiding this comment

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

This is okay.

@iudeen iudeen requested a review from Kludex December 26, 2024 12:57
Copy link
Owner

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks. :)

@Kludex Kludex changed the title Make max_part_size customizable Add max_part_size parameter to MultiPartParser Dec 28, 2024
@Kludex Kludex enabled auto-merge (squash) December 28, 2024 04:55
@Kludex Kludex merged commit cef7834 into Kludex:master Dec 28, 2024
6 checks passed
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.

MultiPartException: Part exceeded maximum size 1M

2 participants

Comments