Serve a file
client.assets.serve(AssetServeParams { url } query, RequestOptionsoptions?): Response
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.
Serve a file
import BeeperDesktop from '@beeper/desktop-api';
const client = new BeeperDesktop({
accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});
const response = await client.assets.serve({ url: 'x' });
console.log(response);
const content = await response.blob();
console.log(content);