Skip to main content

Module media_uploads

Module media_uploads 

Source
Expand description

Where uploaded course media is stored, under which names, and how large it may be. Shared by the CMS upload and the agent upload so both put files in the same places under the same limits.

Enums§

MediaKind
What an upload is, by its MIME top-level type.
MediaOwner
Who an upload belongs to; the first folder of its path.

Constants§

DEFAULT_SIZE_LIMIT_BYTES 🔒
SIZE_LIMITS_BYTES 🔒

Functions§

media_path
<owner>/<id>/<images|audios|files>/<file_name>.
size_limit_bytes
The largest upload allowed for a MIME top-level type such as image.
stored_file_name
A fresh random name to store an upload under, keeping the letters and digits of the original name’s extension.