Module file_uploading

Source
Expand description

Helper functions related to uploading to file storage.

Re-exportsΒ§

pub use crate::domain::authorization::AuthorizationToken;

StructsΒ§

ExerciseTaskInfo

EnumsΒ§

FileType πŸ”’
StoreKind

ConstantsΒ§

DEFAULT_FILE_SIZE_LIMIT πŸ”’
FILE_SIZE_LIMITS πŸ”’

FunctionsΒ§

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 πŸ”’
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 field to the given path in file storage.
upload_file_from_cms
Processes an upload from CMS.
upload_file_to_storage πŸ”’
upload_image_for_organization
Processes an upload for an organization’s image.
validate_media_headers πŸ”’
Generates a path for an audio file with the appropriate extension.