| mx_media_config | R Documentation |
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.
mx_media_config(session)
session |
An "mx_session" object. |
A list; $`m.upload.size` is the upload cap in bytes
(may be absent if the server does not advertise one).
## Not run:
cap <- mx_media_config(s)$`m.upload.size`
file.size("clip.mp4") <= cap
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.