---
title: "Storage Plugin"
description: "Attachment storage and download management for any content type."
type: "docs"
category: "doc"
tags: []
authors: [Anonymous]
date: "2026-08-21"
last_update: "2026-08-21"
time_minutes: 2
draft: false
unlisted: false
url: "https://www.derafu.dev/docs/ui/content/storage"
---

# Storage plugin

Serves file attachments that live next to a content item — images, PDFs, quiz files for an [Academy](./academy) lesson, etc. — through a single, uniform URL, regardless of which content plugin owns the item.

## Attachment convention

An attachment is any file placed in a `_attachments/` subdirectory next to its content file, named after that file (without extension):

```text
resources/content/academy/getting-started/introduction/what-is-this.md
resources/content/academy/getting-started/introduction/what-is-this/_attachments/
  cheat-sheet.pdf
  quiz.json
```

`what-is-this.md`'s attachments are exactly the files under `what-is-this/_attachments/`. Reference one from frontmatter as `?attachment=<filename>` — see the `test` field of [Academy](./academy) lessons for a real example.

## Route

| Route | Path | Description |
|---|---|---|
| `content_storage_download` | `GET /{type}/{uri}/_attachments/{attachment}` | Downloads an attachment. `type` is the content type (`docs`, `academy`, etc.), `uri` is the item's URI. |

## Configuration (`services.yaml`)

None. Enabling the plugin (`storage: ~`) is all that's needed — it has no options of its own, it only serves whatever attachments already exist next to items loaded by the other content plugins.

```yaml
parameters:
    derafu.content.config:
        plugins:
            storage: ~
```

## Content frontmatter

Not applicable — attachments are files on disk, not content items, and are not referenced through frontmatter fields of their own (beyond however a specific plugin points at them, like Academy's `test`).



---
Last updated on 21/08/2026

