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.mp42. 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/logoReplace 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,ogv4. 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
- HTTP 206 Partial Content: Video scrubbing and audio playback stream directly without loading multi-gigabyte files into server RAM.
- Zero Orphaned Files: Direct multipart streaming aborts cleanly on client disconnect with zero partial files left on disk.