pub struct UploadConfig {
pub backend: StorageBackend,
pub path: String,
pub max_file_size: Option<String>,
}Expand description
Upload configuration, deserialized from YAML via modo::config::load().
The s3 field is only available when the opendal feature is enabled.
Irrelevant fields are silently ignored for the active backend.
Fields§
§backend: StorageBackendWhich storage backend to use.
path: StringLocal directory for file uploads.
max_file_size: Option<String>Default max file size when no per-field #[upload(max_size)] is set.
Human-readable: “10mb”, “500kb”. None disables the default limit.
Implementations§
Source§impl UploadConfig
impl UploadConfig
Trait Implementations§
Source§impl Clone for UploadConfig
impl Clone for UploadConfig
Source§fn clone(&self) -> UploadConfig
fn clone(&self) -> UploadConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UploadConfig
impl Debug for UploadConfig
Source§impl Default for UploadConfig
impl Default for UploadConfig
Source§impl<'de> Deserialize<'de> for UploadConfigwhere
UploadConfig: Default,
impl<'de> Deserialize<'de> for UploadConfigwhere
UploadConfig: 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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UploadConfig
impl RefUnwindSafe for UploadConfig
impl Send for UploadConfig
impl Sync for UploadConfig
impl Unpin for UploadConfig
impl UnsafeUnpin for UploadConfig
impl UnwindSafe for UploadConfig
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
Mutably borrows from an owned value. Read more