I am using tornado to make an image processing RESTful service, which is accepting images uploaded by general HTTP means like multipart/form-data
. I then access them in handlers using self.request.files
.
It could be that an adversary will try to upload a huge file to break down a service. Is there any way to tell tornado an uploaded file size limit, exceeding which file should be discarded and error HTTP status should be set?