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

Add new max_upload_size API option #9100

Merged
merged 3 commits into from Jun 29, 2021

Conversation

Selutario
Copy link
Member

Related issue
Closes #9054

Description

Hello team,

As requested in #9054, this PR adds a new API config option called max_upload_size. It lets the user choose how big can the body be in the API requests. If the limit is exceeded, a 413 code (Request Entity Too Large) is returned:

{
  "title": "Request Entity Too Large",
  "detail": "Maximum request body size 10 exceeded, actual body size 41"
}

The following can be specified so there is no limit on the body size:

# Maximum body size that the API can accept, in bytes (0 -> limitless)
max_upload_size: 0

Regards,
Selu.

@Selutario Selutario self-assigned this Jun 24, 2021
Copy link
Contributor

@vicferpoy vicferpoy left a comment

Choose a reason for hiding this comment

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

Missing changes on spec (response examples) and documentation PR.

@Selutario Selutario requested a review from vicferpoy June 25, 2021 08:36
vicferpoy
vicferpoy previously approved these changes Jun 25, 2021
Copy link
Contributor

@vicferpoy vicferpoy left a comment

Choose a reason for hiding this comment

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

LGTM!

@Selutario Selutario force-pushed the feature/9054-api-config-max-size branch from 374fb00 to c0308d1 Compare June 29, 2021 14:19
@davidjiglesias davidjiglesias merged commit a3d2d1a into master Jun 29, 2021
@davidjiglesias davidjiglesias deleted the feature/9054-api-config-max-size branch June 29, 2021 15:31
antoniomanuelfr pushed a commit that referenced this pull request Jul 9, 2021
* Add new 'max_upload_size' API option

* Update spec examples and response codes

* Increase default max_upload_size to 10MB
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.

Add parameter that allows to modify the maximum API upload size
3 participants