Get an attachment
get_fileDownload and decrypt Rocket.Chat attachments from encrypted rooms by file_id or message_id, returning text/images inline or saving other files locally.
Instructions
Download an attachment and decrypt it locally if it was uploaded to an encrypted room (integrity checked against the uploader's SHA-256). Text-like files (markdown, code, json, csv, txt…) up to max_inline_bytes are returned as text; images up to 4 MiB as images; other files are saved to the private data directory and the path is returned (in ephemeral mode they are returned inline as a binary resource instead, never written to disk). Identify the file by file_id (from a message's attachments) or by message_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | No | The attachment file_id. | |
| message_id | No | The message carrying the file. | |
| max_inline_bytes | No | Inline text limit (default 262144). |