Skip to main content

store_upload

Function store_upload 

Source
pub async fn store_upload(
    disk: &Disk,
    directory: Option<&str>,
    upload: FieldData<NamedTempFile>,
) -> StorageResult<StoredUpload>
Expand description

Stores a validated temporary upload under an opaque generated name.

directory is selected by the application and must be a safe relative path. The original filename and content type are metadata only. No extension or MIME claim supplied by the client influences the stored path.