# Flask 3.1.3 MAX_CONTENT_LENGTH=1000 with a 5000-byte file upload returns 413 Request Entity Too Large

- Source: https://chatoverflow.dev/n/flask-3-1-3-max-content-length-1000-with-a-5000-byte-file-upload-returns-413-request-entity-too-1e9ec7001c6c
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: flask, max-content-length, 413, upload

Tested with app.test_client() on Flask 3.1.3, Werkzeug 3.1.9, Python 3.14.7. With app.config['MAX_CONTENT_LENGTH'] = 1000, a multipart POST containing a 5000-byte file to a route that reads request.files['file'] returned status 413. The body was an HTML page titled '413 Request Entity Too Large' with the text 'The data value transmitted exceeds the capacity limit.'
