matrix-spec/event-schemas/schema/m.room.message#m.file
Richard van der Hoff 5b12e2cfef Convert event schemas to yaml
We've decided to make the event schemas YAML, so we might as well take
advantage of it.

(This conversion was done mostly automatically, except for:
 - s/null/"null"/ in m.room.member
 - reformat description in m.room.power_levels
2016-06-22 12:01:08 +01:00

53 lines
1.4 KiB
Plaintext

---
allOf:
- $ref: core-event-schema/room_event.yaml
description: This message represents a generic file.
properties:
content:
properties:
body:
description: A human-readable description of the file. This is recommended to be the filename of the original upload.
type: string
filename:
description: The original filename of the uploaded file.
type: string
info:
description: Information about the file referred to in ``url``.
properties:
mimetype:
description: The mimetype of the file e.g. ``application/msword``.
type: string
size:
description: The size of the file in bytes.
type: integer
title: FileInfo
type: object
msgtype:
enum:
- m.file
type: string
thumbnail_info:
allOf:
- $ref: core-event-schema/msgtype_infos/image_info.yaml
description: Metadata about the image referred to in ``thumbnail_url``.
title: ImageInfo
type: object
thumbnail_url:
description: The URL to the thumbnail of the file.
type: string
url:
description: The URL to the file.
type: string
required:
- msgtype
- body
- url
- filename
type: object
type:
enum:
- m.room.message
type: string
title: FileMessage
type: object