have heavy upload traffic, you can have a faster production server like Nginx
or Lighttpd serve the uploads.
+Also, if you are using Flask 0.6 or greater, the `MAX_CONTENT_LENGTH` setting
+may be useful. It will limit the max size of uploaded form data, including
+files. This functionality is not available in Flask 0.5.1.
If your app has a factory function, that is a good place to place this call.
-In addition, you can also use `patch_request_class` to patch your app's
-`~flask.Flask.request_class` to have a maximum size for uploads. By default,
-there is no limit, so it's possible for script kiddies to crash your server
-by uploading gigantic files. Calling it will install a limit that prevents
-it from loading more than a certain amount of data. ::
- patch_request_class(app) # 16 megabytes
- patch_request_class(app, 32 * 1024 * 1024)
-If you need to upload huge files, you may want to look into another solution
.. autofunction:: configure_uploads
-.. autofunction:: patch_request_class
.. autoclass:: TestingFileStorage
+.. autofunction:: patch_request_class