mx_upload: Upload a file to the homeserver media repository

View source: R/media.R

mx_uploadR Documentation

Upload a file to the homeserver media repository

Description

Upload a file to the homeserver media repository

Usage

mx_upload(session, path, content_type = NULL, filename = NULL)

Arguments

session

An "mx_session" object.

path

Character. Local file path.

content_type

Character or NULL. MIME type; guessed from the file extension if NULL.

filename

Character or NULL. Filename advertised to the server.

Value

An "mxc://" URI as a character string.

Examples

## Not run: 
uri <- mx_upload(s, "photo.png")

## End(Not run)

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