# Files and folders

> Uploads that belong to a blueprint, the size ceilings and storage quotas, and how an over-quota account recovers.

Step 2 of the editor holds a column view for everything uploaded alongside the
blueprint: images used in prose, attachments readers can download, and diagram
sources.

## Folders

Files have a folder path rather than sitting in actual directories, so
reorganising never breaks a reference. Create a folder, drag files into it,
rename freely.

## Referencing a file

An uploaded image is inserted into rich text as an ordinary markdown image;
other files become links. Both keep resolving after a move, a rename, and a
publish.

A file's URL is keyed on the **file's** id, not the blueprint's, because
publishing reparents a draft's files onto the published blueprint and deletes
the draft row. A blueprint id baked into a link would dangle after one publish.
The URL also re-resolves storage on every request, so a reference that outlives
a signed URL's expiry still works.

## Visibility

> [!IMPORTANT]
> Files inherit the blueprint's access, checked on every read against the
> blueprint that owns the file *now*, never against one supplied by the caller.
> A file on a private blueprint is not readable by an anonymous visitor even
> with a direct URL, and a password gate covers the files too.
>
> Unlisted is not secret. Anyone with the link has the attachments.

## Ceilings

| | |
| --- | ---: |
| One uploaded file | 20 MB |
| One diagram document, including its thumbnail | 5 MB |

The 5 MB document cap exists because the request body ceiling above it is
6 MB. A document that passed would fail on the way out.

## Quotas

Storage is counted per owner, not per blueprint:

| Owner | Quota |
| --- | ---: |
| Personal, free | 500 MB |
| Personal, premium | 5 GB |
| Team | 20 GB |
| Organisation | 20 GB |
| Organisation, enterprise | 100 GB |

The total counts diagram documents and their thumbnails, externalised diagram
images, attachments, blueprint asset files and custom icon packs. A draft and
its published sibling share the same stored objects, so a published blueprint
is not charged twice.

It does not yet count inline markdown, version snapshots, templates, folium
assets, podium assets, avatars and covers. The figure therefore runs below
actual usage.

> [!TIP]
> A write that reduces your total is never rejected, whatever your quota says,
> because deleting is how an over-quota account recovers. If you are blocked,
> delete something and carry on. The limit does not need raising first.

Both figures are shown on
[billing and usage](/foliums/blueprintr-user-guide/account/billing-and-usage).
