> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Files and cards

> Attachments up to 1 GiB reach the session as file paths; the session posts files and cards back with `send_file` and `post_card`

![A PNG posted by the session into its thread, shown inline under its comment and file name](https://mintcdn.com/opensandbox/wc3ROkMcBR7DifaQ/images/slack/file-posted.png?fit=max\&auto=format\&n=wc3ROkMcBR7DifaQ\&q=85\&s=c94b940c53d2c0a38ba7d69f1781c81c)

## Files into a session

Attach files to a message addressed to `@computer`. The runner downloads each one to a temp directory on the computer, outside the repositories, and gives the model the path.

| File | What happens |
| - | - |
| 5 MiB or smaller | Downloaded before the message reaches the model. PNG, JPEG, GIF and WebP are also given to the model inline. |
| Larger than 5 MiB | The message is delivered at once; the file appears at the path when its background download completes. |
| Larger than 1 GiB | Not downloaded. |
| Download failed | The model gets `[attached <name>: could not be downloaded (<reason>)]`. |

A reason that mentions an HTML page means the bot is missing the `files:read` scope; see Connect Slack.

## Files out of a session

The session posts a file into its thread with the `send_file` tool. PNG, JPEG, GIF and WebP images render inline; any other file is an attachment.

A script running in the session can post without a tool call. It exits 0 when the file is posted; otherwise it prints the reason to stderr and exits 1.

```bash theme={null}
calvin-send-file <path> [comment words...] [--title T] [--alt TEXT]
```

| Limit | Value |
| - | - |
| Location | Inside the session's working directory or the temp directory |
| Type and size | A regular, non-empty file of at most 100 MiB |
| Files per runner | 50. The count starts again when the runner does. |
| Secrets | A file containing a session secret's value is refused; the refusal names the secret. See [Redaction](https://docs.opencomputer.dev/slack/secrets-and-variables.md#redaction). |
| Slack scope | `files:write` |

## Cards

The session posts a table, a chart or a set of labelled fields as a Slack card with the `post_card` tool.

![A card in a thread: a title, four labelled fields, a table and a link button](https://mintcdn.com/opensandbox/wc3ROkMcBR7DifaQ/images/slack/card.png?fit=max\&auto=format\&n=wc3ROkMcBR7DifaQ\&q=85\&s=44bee1f700f7d4f0f93d75f3f27abb88)

| Limit | Value |
| - | - |
| Tables per card | 1, up to 100 rows and 20 columns |
| Charts per card | 2, each up to 12 series and 20 points |
| Fields per card | 10 |
| Cards per runner | 50 |

* A card over a limit is refused, never posted in a reduced form.
* A card whose content includes a secret's value is not posted.
* Buttons on a card are links only; none sends a click back to the session.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.