Search code examples
pythontornado

how to upload file large then 100M with tornado


i want to upload a file large then 100M, but i got an error.

i found the official document 4.0 mention about large file problem,but i didn't find the example.

how to solve this problem. thanks.


Solution

  • You can pass HTTP options to app.listen:

    app.listen(8888, max_body_size=200 * 1024 * 1024)
    

    Any of the HTTP1ConnectionParameters can be passed as keyword arguments to listen this way.