pub struct FormSection {
pub max_request_size: usize,
pub max_file_size: u64,
pub max_field_size: usize,
pub memory_threshold: usize,
pub temp_dir: Option<String>,
}Expand description
multipart/form-data upload settings.
These are deliberately separate from App.MaxBodySize: a JSON endpoint
should stay tightly bounded while an upload endpoint legitimately accepts
far more. A request is measured against MaxRequestSize when it declares
Content-Type: multipart/form-data, and against App.MaxBodySize
otherwise.
Fields§
§max_request_size: usizeLargest accepted multipart request body, in bytes. Default: 256 MiB.
max_file_size: u64Largest accepted individual file part, in bytes. Default: 128 MiB.
max_field_size: usizeLargest accepted individual text field, in bytes. Default: 1 MiB.
memory_threshold: usizeBytes buffered in memory per file before spooling to disk. Default: 1 MiB.
Set to 0 to spool every upload, or very high to keep everything in
memory.
temp_dir: Option<String>Directory for spooled uploads. Default: webx-uploads under the system
temporary directory.
Trait Implementations§
Source§impl Clone for FormSection
impl Clone for FormSection
Source§fn clone(&self) -> FormSection
fn clone(&self) -> FormSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more