# File uploads

> Drop PDF, Markdown, or plain text into a source.

An **Upload files** source stores the originals and indexes them for search and chat. Create the source first, then drop files on the source page.

## Add a file source

1. Open a knowledge base and add **Upload files**.
2. Give it a name (for example "Product manuals").
3. Optionally set a **URL template** so citations can point at a public file or docs page instead of a stored object.
4. Create the source, then upload.

Accepted types: **PDF**, **Markdown** (`.md`), and **plain text** (`.txt`).

Markdown files may start with YAML frontmatter (`---` … `---`). `title` becomes the page name. `thumbnail` (an image URL) is shown on search results when **Thumbnails** is on. Other keys are stored as page metadata and can be used as searchable or filterable fields. `draft: true` or `hidden: true` stores the file but hides it from search and chat.

Limits: **10 MB** per file, **25** files at a time, **100 MB** per batch.

Re-uploading the same filename replaces that page and re-indexes it. A different name creates a new page.

## URL templates

Under **Advanced settings**, an optional **URL template** lets citations deep-link to the public location of a file.

| Placeholder | Meaning |
|---|---|
| `{path}` | Filename without the extension |
| `{anchor}` | Heading slug (Markdown / HTML) |
| `{page}` | PDF page number |

Examples:

```
https://docs.example.com/{path}#{anchor}
https://files.example.com/{path}.pdf#page={page}
```

Missing `{anchor}` or `{page}` fragments are stripped, so a file with no heading still gets a clean URL. Leave the field blank if the files are only used inside Datalumo.

## After it is Ready

Indexing runs in the background after each batch. Watch progress on the source page, then point a [chat](/docs/chat) or [search](/docs/search) widget at this source.

For structured content you already have in an app, [push pages](/docs/api-push) or use the [Laravel](/docs/laravel) or [PHP](/docs/php) client instead.
