@app.before_request("/upload")
def function(request: Request):
if request.form_data.get("user_id") is None:
return Response(description="User ID is required", status_code=400, headers={})
return request
One needs to do this all the time
And this doesn't work
@app.before_request("/upload")
def function(request: Request):
if request.form_data.get("user_id") is None:
return {"message":"User ID is required"}
return request
Or
@app.before_request("/upload")
def function(request: Request):
if request.form_data.get("user_id") is None:
return ("User ID is required", 400, {})
return request
Fix this
No response
None
python --version
)None
None
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too