Recipes
Overview
Task-shaped walkthroughs — the common media jobs (avatars, galleries, browser uploads, serving, multi-disk) and the extension points (custom driver, custom store, testing).
The concepts pages explain the model; these are the jobs people actually sit down to do. Each one is self-contained — start from the closest match and adapt.
Common jobs
| Recipe | What it covers |
|---|---|
| Single-file avatar | one file per owner, replacing the previous one, with a cropped variant |
| Gallery with thumbnails | an ordered collection, reordering, and lazy thumbnails |
| Resumable uploads from the browser | tus and presigned direct-to-S3, and when each is the right one |
| Serving files | public URLs, signed URLs, and streaming through your own controller |
| Multiple disks | routing collections at different backends, and moving files between them |
Without the media library
| Recipe | What it covers |
|---|---|
| Raw storage (no entities) | a disk and nothing else — generated reports, caches, scratch files |
| Consuming storage from another library | the /storage subpath, for a library that just needs a filesystem |
Extending it
| Recipe | What it covers |
|---|---|
| Writing a custom disk driver | the StorageDriver SPI, capabilities, and the conformance suite |
| Writing a custom store | the MediaStore SPI, plus the optional query methods the dashboard needs |
| Testing your media code | the in-memory driver/store and the conformance suites |