Expand description
Helper functions related to uploading to file storage.
Re-exportsΒ§
pub use crate::domain::authorization::AuthorizationToken;
StructsΒ§
- Exercise
Service Upload Cleanup - Tracks uploaded object paths for cleanup when the batch fails.
- Exercise
Service πUpload Metadata - Exercise
Service Upload Result Entry - Exercise
Task Info
EnumsΒ§
ConstantsΒ§
- DEFAULT_
FILE_ πSIZE_ LIMIT - EXERCISE_
UPLOAD_ πMAX_ BATCH_ BYTES - EXERCISE_
UPLOAD_ πMAX_ FILES - EXERCISE_
UPLOAD_ πMAX_ FILE_ BYTES - FILE_
SIZE_ πLIMITS
FunctionsΒ§
- consume_
exercise_ πupload_ bytes - delete_
file_ from_ storage - generate_
audio_ πpath - Generates a path for an audio file with the appropriate extension.
- generate_
file_ πpath - Generates a path for a generic file with the appropriate extension based on its filename.
- generate_
image_ πpath - Generates a path for an image file with the appropriate extension.
- get_
size_ πlimit_ for_ mime - limited_
exercise_ πupload_ stream - Returns a side channel for typed upload-limit errors because the stream yields
anyhowerrors. Callers must inspect it afterupload_streamreturns. - make_
filename_ πsafe - nested_
path π - path π
- process_
exercise_ service_ upload - Processes an upload from an exercise service or an exercise iframe. This function assumes that any permission checks have already been made.
- upload_
certificate_ svg - upload_
exercise_ archive - upload_
field_ from_ cms - Processes an upload from CMS.
- upload_
field_ πto_ storage - Uploads the data from the multipart
fieldto the givenpathin file storage. - upload_
file_ from_ cms - Processes an upload from CMS.
- upload_
file_ πto_ storage - upload_
file_ πto_ storage_ in_ existing_ transaction - upload_
image_ for_ organization - Processes an upload for an organizationβs image.
- validate_
exercise_ πupload_ file_ count - validate_
exercise_ πupload_ filename - validate_
exercise_ πupload_ id - validate_
exercise_ πupload_ not_ empty - validate_
media_ πheaders - Generates a path for an audio file with the appropriate extension.