Interface FileContent

Content format of media events with msgtype m.file

interface FileContent {
    body: string;
    file?: EncryptedFile;
    filename?: string;
    format?: "org.matrix.custom.html";
    formatted_body?: string;
    info?: FileInfo;
    msgtype: File;
    "org.matrix.msc3089.leaf"?: {};
    url?: string;
}

Hierarchy (View Summary)

Properties

body: string

If filename is not set or the value of both properties are identical, this is the filename of the original upload. Otherwise, this is a caption for the file.

Required if the file is encrypted. Information on the encrypted file, as specified in End-to-end encryption.

filename?: string

The original filename of the uploaded file.

format?: "org.matrix.custom.html"

The format used in the formatted_body.

formatted_body?: string

The formatted version of the body, when it acts as a caption. This is required if format is specified.

info?: FileInfo

Information about the file referred to in url.

msgtype: File

One of: [m.file].

"org.matrix.msc3089.leaf"?: {}
url?: string

Required if the file is unencrypted. The URL (typically mxc:// URI) to the file.