Upload an image for a media panel.
Uploads an image to use as the src of a media panel element. The image is validated (PNG, JPEG, or WebP, max 5 MB, max 4096×4096), re-encoded (JPEG stays JPEG, PNG/WebP become PNG — stripping EXIF/metadata/active content), and stored in the public asset bucket under a content-addressed, immutable key (media/<orgId>/<hash>.<ext>). The returned URL is a dvt-hosted https asset (e.g. https://assets.dvt.dev/media/...) that passes the media sanitizer and CSP, so it can be placed directly in a media panel's src.
Requires dashboard edit access (dashboard:write) — any editor, not just owners. Uploaded images are public-read by anyone holding the (unguessable) URL.
Unavailable in DVT_MODE=snowflake (returns 503): that deployment mode has no durable, re-resolvable object store wired to this endpoint yet, only a filesystem backend whose signed URLs expire after 24h — persisting one into a dashboard spec would break the panel once it expires. A follow-up will store the object key (not a signed URL) and re-resolve a fresh one per dashboard load, the same pattern branding logos already use. Branding logo upload/serving is unaffected and works normally in this mode.
Request
- Base URL: http://localhost:8080
- URL: http://localhost:8080/v1/orgs/{orgId}/media
- Auth: one of:
- API key in cookie dvt_session
- HTTP bearer
Response
Image uploaded successfully. Returns the hosted URL and metadata.
Changes
No recorded changes to this operation across all 1 revision of this API.