Skip to content
Download Beeper

Serve an asset

client.Assets.Serve(ctx, query) error
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 param.Field[string]

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

minLength1

Serve an asset

package main

import (
  "context"

  "github.com/beeper/desktop-api-go"
)

func main() {
  client := beeperdesktopapi.NewClient(

  )
  err := client.Assets.Serve(context.TODO(), beeperdesktopapi.AssetServeParams{
    URL: "x",
  })
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples