2016-06-22 12:03:02 +02:00
|
|
|
---
|
2025-08-27 08:39:05 +02:00
|
|
|
$schema: https://json-schema.org/draft/2020-12/schema
|
|
|
|
|
|
2016-06-22 12:03:02 +02:00
|
|
|
allOf:
|
|
|
|
|
- $ref: core-event-schema/room_event.yaml
|
|
|
|
|
description: This message represents a generic file.
|
|
|
|
|
properties:
|
|
|
|
|
content:
|
|
|
|
|
properties:
|
|
|
|
|
body:
|
2024-02-26 23:15:44 +01:00
|
|
|
description: |-
|
|
|
|
|
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.
|
2016-06-22 12:03:02 +02:00
|
|
|
type: string
|
2024-02-26 23:15:44 +01:00
|
|
|
x-changedInMatrixVersion:
|
|
|
|
|
"1.10": This property can act as a caption for the file.
|
|
|
|
|
format:
|
|
|
|
|
description: |-
|
2025-07-15 10:47:50 +02:00
|
|
|
The format used in the `formatted_body`. This is required if `formatted_body`
|
|
|
|
|
is specified. Currently only `org.matrix.custom.html` is supported.
|
2024-02-26 23:15:44 +01:00
|
|
|
type: string
|
|
|
|
|
x-addedInMatrixVersion: "1.10"
|
|
|
|
|
formatted_body:
|
|
|
|
|
description: |-
|
|
|
|
|
The formatted version of the `body`, when it acts as a caption. This
|
|
|
|
|
is required if `format` is specified.
|
|
|
|
|
type: string
|
|
|
|
|
x-addedInMatrixVersion: "1.10"
|
2016-06-22 12:03:02 +02:00
|
|
|
filename:
|
|
|
|
|
description: The original filename of the uploaded file.
|
|
|
|
|
type: string
|
|
|
|
|
info:
|
2021-01-27 21:14:31 +01:00
|
|
|
description: Information about the file referred to in `url`.
|
2016-06-22 12:03:02 +02:00
|
|
|
properties:
|
|
|
|
|
mimetype:
|
2021-01-27 21:14:31 +01:00
|
|
|
description: The mimetype of the file e.g. `application/msword`.
|
2016-06-22 12:03:02 +02:00
|
|
|
type: string
|
|
|
|
|
size:
|
|
|
|
|
description: The size of the file in bytes.
|
|
|
|
|
type: integer
|
2016-11-07 15:28:19 +01:00
|
|
|
thumbnail_url:
|
2018-08-31 18:59:57 +02:00
|
|
|
description: |-
|
|
|
|
|
The URL to the thumbnail of the file. Only present if the
|
|
|
|
|
thumbnail is unencrypted.
|
2016-11-07 15:28:19 +01:00
|
|
|
type: string
|
2018-08-31 18:11:27 +02:00
|
|
|
thumbnail_file:
|
|
|
|
|
description: |-
|
|
|
|
|
Information on the encrypted thumbnail file, as specified in
|
2021-01-29 01:00:39 +01:00
|
|
|
[End-to-end encryption](/client-server-api/#sending-encrypted-attachments).
|
|
|
|
|
Only present if the thumbnail is encrypted.
|
2018-08-31 18:11:27 +02:00
|
|
|
title: EncryptedFile
|
|
|
|
|
type: object
|
2016-11-04 15:53:59 +01:00
|
|
|
thumbnail_info:
|
|
|
|
|
allOf:
|
2016-11-07 11:50:52 +01:00
|
|
|
- $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
|
2021-01-27 21:14:31 +01:00
|
|
|
description: Metadata about the image referred to in `thumbnail_url`.
|
2016-06-22 12:03:02 +02:00
|
|
|
title: FileInfo
|
|
|
|
|
type: object
|
|
|
|
|
msgtype:
|
|
|
|
|
enum:
|
|
|
|
|
- m.file
|
|
|
|
|
type: string
|
|
|
|
|
url:
|
2019-06-11 16:29:50 +02:00
|
|
|
description: |-
|
2023-04-26 15:11:35 +02:00
|
|
|
Required if the file is unencrypted. The URL (typically [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris))
|
2019-06-11 16:29:50 +02:00
|
|
|
to the file.
|
2016-06-22 12:03:02 +02:00
|
|
|
type: string
|
2018-08-31 18:11:27 +02:00
|
|
|
file:
|
|
|
|
|
description: |-
|
|
|
|
|
Required if the file is encrypted. Information on the encrypted
|
2021-01-29 01:00:39 +01:00
|
|
|
file, as specified in
|
|
|
|
|
[End-to-end encryption](/client-server-api/#sending-encrypted-attachments).
|
2018-08-31 18:11:27 +02:00
|
|
|
title: EncryptedFile
|
|
|
|
|
type: object
|
2016-06-22 12:03:02 +02:00
|
|
|
required:
|
|
|
|
|
- msgtype
|
|
|
|
|
- body
|
|
|
|
|
type: object
|
|
|
|
|
type:
|
|
|
|
|
enum:
|
|
|
|
|
- m.room.message
|
|
|
|
|
type: string
|
|
|
|
|
title: FileMessage
|
|
|
|
|
type: object
|