# Work with files

_Upload files, preview them inline, and reference the same file anywhere._

Canonical: https://snoze.dev/help/work-with-files/

Files are first-class items in Snoze, not attachments buried on a page. An
uploaded file lives in the sidebar like a page or database, opens to its own
preview, and can be referenced from anywhere without re-uploading.

## Uploading

1. **Bring a file in**

   Drag a file from your computer into the sidebar or a folder, or use the
   create menu to upload one. Snoze stores the file and creates a **file
   item** pointing at it, named after the file.

2. **Or add media inside a page**

   Inside a [page](https://snoze.dev/help/create-your-first-page/), an image, video, or audio
   block can upload a file directly — paste a URL or pick a file, and it
   renders in place.

Images, video, audio, PDFs, text, and archives are all supported. A file can use
any of the storage remaining in your workspace (see
[Billing and plans](https://snoze.dev/help/billing-and-plans/)).

## Previewing

Open a file item and Snoze shows it inline where it can:

- **Images** render on a stage; click one to open the full-size **lightbox**.
- **Video** and **audio** play with native controls.
- **PDFs** display in an embedded viewer.
- **Text and code** show a formatted preview.

Anything Snoze can't render inline — an archive, an unusual format — falls back
to a clear "preview unavailable" card. Every file, previewable or not, offers
**Copy link**, **Open**, and **Download** from its header.

## Referencing the same file everywhere

Because a file is a real item with a stable id, the _same_ file can appear in
many places at once — embedded in a page, attached to a database record's file
field, or placed as an image on a [canvas](https://snoze.dev/help/canvas-basics/) — all pointing
at one stored copy. Uploading the identical file twice doesn't duplicate the
bytes; Snoze recognises it and stores it once.

> [!NOTE]
> A file inherits the same [sharing and permissions](https://snoze.dev/help/permissions-explained/)
> as any other item. When you need to hand a file to someone outside the
> workspace, mint an expiring, revocable share link rather than exposing the
> item — see [Share with a public link](https://snoze.dev/help/share-with-a-public-link/).

> [!WARNING]
> Deleting a file item removes the underlying file. If other items still
> reference it, check those first — the preview there will go missing once the
> file is gone.

## Password-protected PDFs

Open a protected PDF from the workspace, a database file field, or an AI chat
attachment and enter its password. After opening, choose:

- **Save password for me** to remember an encrypted password privately. Other
  people and automations do not inherit it. **Forget password** removes it.
- **Unlock for everyone** to remove protection from the stored PDF. This requires
  edit access and preserves its file ID and references. Everyone already allowed
  to read that file, including automations, can then read it without a password.

The AI can use a password supplied to it when opening a file. If an automation
needs a password it does not have, it stops unless user input is enabled. Password
unlocking currently supports PDFs; other encrypted file formats are unsupported.