mx_media_config: Query the homeserver's media configuration

View source: R/media.R

mx_media_configR Documentation

Query the homeserver's media configuration

Description

Asks the server for its media limits, chiefly m.upload.size (maximum upload bytes), so callers can check a file fits before uploading. Tries the v1 endpoint and falls back to the legacy location for older homeservers.

Usage

mx_media_config(session)

Arguments

session

An "mx_session" object.

Value

A list; $`m.upload.size` is the upload cap in bytes (may be absent if the server does not advertise one).

Examples

## Not run: 
cap <- mx_media_config(s)$`m.upload.size`
file.size("clip.mp4") <= cap

## End(Not run)

mx.api documentation built on Sept. 12, 2026, 1:07 a.m.