Skip to content
Download Beeper

Serve an asset

client.assets.serve(AssetServeParams { url } query, RequestOptionsoptions?): void
GET/v1/assets/serve

Stream a file given an mxc://, localmxc://, or file:// URL. Downloads first if not cached. Supports Range requests for seeking in large files.

ParametersExpand Collapse
query: AssetServeParams { url }
url: string

Asset URL to serve. Accepts mxc://, localmxc://, or file:// URLs.

minLength1

Serve an asset

import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop();

await client.assets.serve({ url: 'x' });
Returns Examples