pub struct UploadFileRequest {
pub name: String,
pub folder_id: FolderId,
pub file: FieldData<Bytes>,
pub mime: Option<String>,
pub asynchronous: Option<bool>,
pub disable_mime_sniffing: Option<bool>,
pub fixed_id: Option<FileId>,
pub parent_id: Option<FileId>,
pub processing_config: Option<String>,
}Fields§
§name: StringName of the file being uploaded
folder_id: FolderIdID of the folder to store the file in
file: FieldData<Bytes>The actual file you are uploading, ensure the mime type for the file is set correctly
mime: Option<String>Optional mime type override, when not present the mime type will be extracted from UploadFileRequest::file
asynchronous: Option<bool>Whether to process the file asynchronously returning a task response instead of waiting for the upload
disable_mime_sniffing: Option<bool>Whether to disable mime sniffing for the file. When false/not specified if a application/octet-stream mime type is provided the file name will be used to attempt to determine the real mime type
fixed_id: Option<FileId>Fixed file ID the file must use. Should only be used for migrating existing files and maintaining the same UUID.
Should not be provided for general use
parent_id: Option<FileId>Optional ID of the parent file if this file is associated as a child of another file. Mainly used to associating attachments to email files
processing_config: Option<String>Optional JSON encoded processing config
Trait Implementations§
Source§impl ComposeSchema for UploadFileRequest
impl ComposeSchema for UploadFileRequest
Source§impl ToSchema for UploadFileRequest
impl ToSchema for UploadFileRequest
Source§impl<S: Sync> TryFromMultipartWithState<S> for UploadFileRequest
impl<S: Sync> TryFromMultipartWithState<S> for UploadFileRequest
Source§fn try_from_multipart_with_state<'life0, 'life1, 'async_trait>(
multipart: &'life0 mut Multipart,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<Self, TypedMultipartError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn try_from_multipart_with_state<'life0, 'life1, 'async_trait>(
multipart: &'life0 mut Multipart,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<Self, TypedMultipartError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Validate for UploadFileRequest
impl Validate for UploadFileRequest
Source§fn validate_into(
&self,
__garde_user_ctx: &Self::Context,
__garde_path: &mut dyn FnMut() -> Path,
__garde_report: &mut Report,
)
fn validate_into( &self, __garde_user_ctx: &Self::Context, __garde_path: &mut dyn FnMut() -> Path, __garde_report: &mut Report, )
Self, aggregating all validation errors into Report.Auto Trait Implementations§
impl !Freeze for UploadFileRequest
impl RefUnwindSafe for UploadFileRequest
impl Send for UploadFileRequest
impl Sync for UploadFileRequest
impl Unpin for UploadFileRequest
impl UnwindSafe for UploadFileRequest
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> 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