Why is the upload file size limited in sanic?

My program is built on sanic,but now I have problem!

The program has a api,it handle file upload,when I send a post request to upload file,it reponse

⚠️ 413 — Request Entity Too Large

Request body exceeds the size limit

This problem occurs when the file size exceeds 100M, there will be no problem with files below 100M

In other frameworks, generally only need to modify the Nginx configuration ,like
client_max_body_size 300m;

But there is a problem in sanic, even if I do not request Nginx, but directly request sanic

app.config.REQUEST_MAX_SIZE = 300_000_000
1 Like

thank you!

Your answer is too quick,I will try it

I guess you asked with good timing :wink: