werkzeug.BaseRequest.max_content_length

BaseRequest.max_content_length = None

the maximum content length. This is forwarded to the form data parsing function (parse_form_data()). When set and the form or files attribute is accessed and the parsing fails because more than the specified value is transmitted a RequestEntityTooLarge exception is raised.

Have a look at dealing-with-request-data for more details.

New in version 0.5.