Skip to content

Media Library

The media library holds the images, video and audio your overlay uses. Files are stored on your own server, under MEDIA_DIR, and served back from /media.

Uploading

Open Media in the dashboard and drop files in, or use the file picker. You can also drag a file straight onto the canvas to create a widget from it.

Uploading requires the media.upload permission, which owners, editors and moderators all have by default.

Accepted file types

Uploads are checked against the file's declared type, and the stored filename is generated by the server rather than taken from your machine:

KindAccepted types
ImagesJPEG, PNG, GIF, WebP
VideoMP4, MPEG, WebM
AudioMP3, WAV, OGG, WebM, FLAC

Anything else is rejected with a 415 Unsupported Media Type.

Why the filename changes

The name on disk is derived from the upload's type, not from the name you sent. A file claiming to be a PNG but called payload.html would otherwise be served back as HTML from your own origin — which is a scripting hole, not a cosmetic one. Uploaded files are also served with X-Content-Type-Options: nosniff.

Size limit

Uploads are capped at 100 MB by default, which comfortably covers stinger videos. Raise it with MEDIA_MAX_BYTES (in bytes) if you need longer clips:

bash
MEDIA_MAX_BYTES=209715200   # 200 MB

Deleting

  • media.delete.own lets someone delete files they uploaded.
  • media.delete.any lets them delete anyone's.

Moderators get the first by default, editors and owners get both. Deleting removes the file from disk as well as the library.

Where files live

Default in Docker/app/media, backed by the anomalist_media volume
Default elsewhere./media
OverrideMEDIA_DIR

Because the volume is a normal Docker volume, backing it up is just backing up that volume — no export step.

Next steps

Released under the MIT License.