docs: add note about large file multipart uploads (#2025)

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
This commit is contained in:
Wowkster 2023-06-22 17:59:39 -04:00 committed by GitHub
parent 68696b09b1
commit 8016e7890c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,6 +50,13 @@ use std::{
/// let app = Router::new().route("/upload", post(upload));
/// # let _: Router = app;
/// ```
///
/// # Large Files
///
/// For security reasons, by default, `Multipart` limits the request body size to 2MB.
/// See [`DefaultBodyLimit`][default-body-limit] for how to configure this limit.
///
/// [default-body-limit]: crate::extract::DefaultBodyLimit
#[cfg_attr(docsrs, doc(cfg(feature = "multipart")))]
#[derive(Debug)]
pub struct Multipart {