pub struct MultipartFormConfig { /* private fields */ }
Expand description
Configure the behaviour of the MultipartForm extractor.
Usage
Add a MultipartFormConfig to your actix app data.
scope("/").app_data(
extractor::MultipartFormConfig::default().file_limit(25 * 1024 * 1024) // 25 MiB
);
Implementations
Change max number bytes of text in the multipart. Defaults to DEFAULT_TEXT_LIMIT.
Change max number of bytes for all files in the multipart. Defaults to DEFAULT_FILE_LIMIT.
Change max number of parts in the form. Defaults to DEFAULT_MAX_PARTS.
pub fn error_handler<F>(self, f: F) -> Self where
F: Fn(MultipartFormError, &HttpRequest) -> Error + 'static,
pub fn error_handler<F>(self, f: F) -> Self where
F: Fn(MultipartFormError, &HttpRequest) -> Error + 'static,
Set custom error handler.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MultipartFormConfig
impl !Send for MultipartFormConfig
impl !Sync for MultipartFormConfig
impl Unpin for MultipartFormConfig
impl !UnwindSafe for MultipartFormConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more