OwnMediaHostDocs
Guides

Media delivery

Permanent media URLs, format controls, streaming, and private access.

Check the returned URL for your release.The platform README uses /a/… aliases and /private/… links; the API document uses /i/… and tokenized /f/… links. These supplied documents differ. Use the actual URL returned by your installed API instead of constructing it.

1. Permanent Media URLs

Clean, durable URLs that never break:

text
https://media.example.com/f/7fd92abc/photo.jpg
https://media.example.com/f/v_a8129/video.mp4

2. Stable Vanity Aliases

Permanent vanity URLs for avatars, branding, and assets:

text
https://media.example.com/a/profile/avatar
https://media.example.com/a/branding/logo

Replace the underlying file in-place without changing the URL:

bash
curl -X PUT https://media.example.com/api/v1/files/med_xxx/content \
  -H "Authorization: Bearer mk_live_xxxx" \
  -F "file=@new_avatar.png"

3. Media Format Whitelisting

Strict extension and MIME-type enforcement at upload time. Configured via /etc/ownmediahost/ownmediahost.env:

env
ALLOWED_IMAGE_FORMATS=jpeg,png,webp,gif,avif,svg,bmp,ico,tiff,heic
ALLOWED_VIDEO_FORMATS=mp4,webm,mov,mkv,avi,wmv,flv,m4v,ts,3gp,ogv

4. Private Media & Signed Temporary URLs

Generate time-limited signed links for confidential assets:

bash
curl -X POST https://media.example.com/api/v1/files/med_xxx/sign-private \
  -H "Authorization: Bearer mk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"expires_seconds": 3600}'

Returns:

text
https://media.example.com/private/7fd92abc?expires=1726750000&signature=...

5. High-Performance Streaming & Range Requests

Based on the supplied platform and API documentation. View project source ↗