# Attachments and files

> Which file types open, embed and search, the size ceilings, and the difference between embedded attachments and standalone file sync.

Source: https://baalda.com/docs/attachments
Site: Baalda, https://baalda.com

Files live in the vault folder alongside the notes, usually in `attachments/`. They sync as bytes, never through the CRDT, and are deduplicated by content hash so the same image embedded in ten notes is stored once.

## What opens, embeds and is searched

Images, PDFs, Office documents, CSV, audio, video, code and text files, and archives. The text inside documents and spreadsheets is extracted, so `search_notes` and the app's search rank a spreadsheet's contents next to your notes, and each hit says whether it is a note or a file.

## Two kinds of syncing

|  | Embedded attachments | Standalone files |
|---|---|---|
| What it means | A file a note embeds or links to | Any other file sitting in the vault folder |
| On the free plan | Synced | Kept on this computer |
| On Team | Synced | Synced across devices |

On a plan without standalone file sync, Baalda says the file stays on this computer rather than retrying it forever.

## Size ceilings

These are server settings. The defaults below are what a self-hosted server uses unless you change them.

| Setting | Default | What it limits |
|---|---|---|
| `MAX_BLOB_BYTES` | 25 MB | One file, when attachment bytes live in Postgres. It is a memory bound: that provider buffers the whole value. |
| `MAX_BLOB_BYTES_DIRECT` | 500 MB | One file, when bytes go to S3-compatible storage and never enter the server process. |
| `BLOB_MIME_ENFORCE` | `reject` | Whether an unknown content type is refused with a 415 or stored with a warning. |
| Per-category caps | varies | Images, PDFs, documents, audio, video, archives and text each have their own ceiling under the two limits above. |

## First launch

When a vault is first registered with a server, Baalda scans it and uploads what your plan allows. Files that never finished uploading are picked up again on later launches, including in very large vaults, and a file wrongly removed from the server while it is still on your computer is registered and uploaded again on its own.

- [Attachment storage](/docs/attachment-storage): Running your own server: Postgres or S3, garbage collection and migration.
