How to set max_form_parts
?
#2636
Unanswered
jessica369tt
asked this question in
Q&A
Replies: 1 comment
-
Generally, you should increase it for specific requests only, so that only requests that require a higher number allow it. from flask import request
@app.post("/complex")
def complex_post():
request.max_form_parts = 5000
... access request.form You can use a subclass instead to set it for a specific application: from flask.wrappers import Request
class MyRequest(Request):
max_form_parts = 5000
app.request_class = MyRequest To set it globally, set the base class's attribute. from werkzeug.wrappers import Request
Reqeust.max_form_parts = 5000 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How do I set the
max_form_parts
attribute? I am using Flask and want to set it to 5000.Beta Was this translation helpful? Give feedback.
All reactions