Features

Media

Uploads to an R2-compatible bucket, referenced by id from media fields.


Pass a bucket to createCMS({ bucket }) to enable media. Any object with R2's put, get, delete, and list fits, such as storage from void/storage.

  • POST /_media: multipart form with a file field, up to 10 MB

  • GET /_media: paged list, DELETE /_media/:id removes one

  • GET /_media/:id/raw: the bytes, which is the URL mediaPath builds

Media and relation fields hold ids; ?include=cover expands them into included. From MCP, upload_media takes base64 content or a URL.