pub struct MultipartConfig {
pub upload_dir: Option<PathBuf>,
}Expand description
Filesystem policy for multipart uploads ([multipart] section).
The byte caps stay in [LimitsConfig] with every other byte cap; a
directory belongs beside [static] dir and [templating] dir.
Parsed in every build, including one without the multipart feature —
the same reason FormLimits carries its values there. A configuration
file that stops being readable depending on how the binary was compiled
is not portable.
Fields§
§upload_dir: Option<PathBuf>Root directory that every part:save(path) resolves inside.
Unset leaves part:save unavailable, the same call [templating] dir makes: there is no safe directory to guess, and an upload
written somewhere nobody chose is worse than a startup error.
Relative paths resolve against the working directory. Must exist
and be writable at startup.
Paths handed to part:save are relative to this directory;
absolute paths and anything climbing out with .. are refused
rather than re-rooted, so the on-disk location always follows from
the source.
Trait Implementations§
Source§impl Clone for MultipartConfig
impl Clone for MultipartConfig
Source§impl Debug for MultipartConfig
impl Debug for MultipartConfig
Source§impl Default for MultipartConfig
impl Default for MultipartConfig
Source§impl<'de> Deserialize<'de> for MultipartConfigwhere
MultipartConfig: Default,
impl<'de> Deserialize<'de> for MultipartConfigwhere
MultipartConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for MultipartConfig
impl RefUnwindSafe for MultipartConfig
impl Send for MultipartConfig
impl Sync for MultipartConfig
impl Unpin for MultipartConfig
impl UnsafeUnpin for MultipartConfig
impl UnwindSafe for MultipartConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more