# Attachments

## What is an attachment?

An attachment is a file you add to a chat message or a discussion comment. Vistazo reads it as it
uploads, and any table inside becomes a [dataset](/docs/data/datasets) you can chart like a connected
source.

Add a file with the paperclip on the composer, then ask for the chart.

> Chart revenue by region from the spreadsheet I just attached

## Which files can you attach?

| Kind | Formats | Largest file |
|---|---|---|
| Tables | `.csv`, `.tsv`, `.xlsx`, `.json` | 20 MB |
| Documents | `.pdf`, `.txt`, `.md` | 20 MB |
| Images | `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif` | 10 MB |

A chat message takes up to 10 files. Guests can't attach files.

## How is a file read?

Vistazo reads each file once, when it uploads.

- A spreadsheet, CSV or JSON file is parsed directly, and each table in it becomes a dataset. Each
  sheet of an `.xlsx` file is its own table.
- A text or markdown file is read as written, and any table in it is picked out.
- A PDF is read from its text layer. A page with no text layer, such as a scan or a photo, is
  transcribed by a vision model.
- An image is transcribed by a vision model, which is how a screenshot of a table becomes rows.

A PDF is read up to 200 pages, and up to 20 scanned pages are transcribed. See
[Limits](/docs/reference/limits).

Each file counts once toward your inference allowance. A scanned PDF counts once for each page that is
transcribed. When your allowance has run out, a new file can't be attached. See
[Usage](/docs/billing/usage).

## How much storage do uploads use?

Your uploads count against your own storage, 1 GB per person. **Settings → Usage** shows how much you
have used.

A file that doesn't fit in the space you have left is refused. If the file fits but its tables don't,
the file and its text still land, and the tables that don't fit aren't saved as datasets. Free up
space and upload it again to get them.

Removing a file from a message before you send it deletes the file and gives the space back at once.
A file left in an unsent draft is deleted after two days.

## Who can open a file?

Anyone who can read the chat or discussion can open its files. So can anyone who can view a dashboard
that shows the file, or charts a table read from it, even with no access to the conversation. On a
dashboard with public access, that means anyone with its address.

> [!WARNING]
> Showing or charting a file from a private chat on a shared dashboard opens that file to everyone who
> can view the dashboard.

## Where are uploaded files listed?

Three lists show uploaded files.

| List | Where | What it shows |
|---|---|---|
| Your files | **Manage** on the Storage row of **Settings → Usage** | Files you uploaded, with your storage at the foot |
| Every file in the workspace | **Settings → Files**, for admins in a shared workspace | Every member's files, with the workspace total at the foot |
| A dashboard's files | The dashboard's **Settings → Files** | Files its widgets show or chart, each with its tables and the number of widgets using it |

Each list searches by name and sorts by **Date** or **Size**. An image opens in place, and any other
file downloads. Seeing a file in the admin list doesn't let an admin open it. Opening still needs
access to the conversation it was posted in, or to a dashboard that uses it.

You can delete your own files, and an admin can delete anyone's. Press the trash button, then press
it again to confirm. When charts use the file, the row first says how many will stop rendering.
What a deleted file does to the charts and widgets that used it is under
[Datasets](/docs/data/datasets#what-happens-when-the-file-is-deleted).
