---
title: Attaching files to documents
related:
  - https://docs.kentico.com/k8/managing-website-content/working-with-files/content-tree-files/inserting-files-into-the-content-tree.md
  - https://docs.kentico.com/k8/managing-website-content/working-with-files/media-library-files/inserting-files-into-media-libraries.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

You may want to attach files directly to documents when, for example, your site is set up to list files attached to documents on a page. If you want to upload larger files, such as videos, to the system, using [media libraries ](https://docs.kentico.com/k8/managing-website-content/working-with-files/media-library-files.md)are usually a better choice.

An advantage of document attachments is that you can attach files related to a document directly to the document. This means that they also stay with the document when you are moving the document elsewhere.

![Viewing+document+attachments](https://docs.kentico.com/docsassets/k8/attaching-files-to-documents/Viewing+document+attachments.png)

## To attach a file to a document

1. Open the **Pages** application.
2. Navigate to the document to which you want to attach a file.
3. Switch to the **Properties -> Attachments** tab.

   ![Displaying+document+attachments](https://docs.kentico.com/docsassets/k8/attaching-files-to-documents/Displaying+document+attachments.png)
4. Click on **New attachment**. A dialog window opens.
5. Choose the file that you want to attach to the document.
6. Click on **Open**.

The system uploads the file to the document.
