/public` | Directory to manage. |
| `baseURL` | `/` | URL base the user app serves `dir` at (e.g. Nuxt `app.baseURL`). |
| `write` | `true` | Enable upload, rename, delete, mkdir. |
| `uploadExtensions` | Nuxt DevTools' allow-list | Extensions `upload` accepts, or `'*'`. |
| `serveStatic` | `false` | Serve the directory's bytes; on for the standalone CLI. |
| `build` | `false` | Registers the `build` subcommand ([Static export](#static-export)). |
## How previews are served
Previews load by **public URL** (`baseURL` + path).
## RPC
Namespaced `devframes:plugin:assets:*`:
| Function | Type | Notes |
|----------|------|-------|
| `list` | `query`, `snapshot: true` | Every file: type, size, mtime. |
| `capabilities` | `query`, `snapshot: true` | Write-enabled flag; the allow-list. |
| `read-image-meta` | `query` | Width/height/orientation. |
| `read-text` | `query` | Truncated preview text; server-highlighted via [`@devframes/service-shiki`](/add-ons/services/shiki), else plain ``. |
| `upload` | `action` | Streaming upload slot; the SPA pipes bytes. |
| `rename` | `action` | Renames one (keeps extension). |
| `delete` | `action` | Deletes one or more. |
| `mkdir` | `action` | Creates a folder + parents. |
| `open-in-editor` / `reveal-in-folder` | `action` | Open/reveal via [`@devframes/service-open`](/add-ons/services/open); always registered. |
`upload` / `rename` / `delete` / `mkdir` register only with `write`.
## Static export
The `build` subcommand is disabled by default (`capabilities: { build: false }`). Pass `{ build: true }` (or `{ force: true }` to `createBuild()`) to bake the listing.
## Source
[`plugins/assets`](https://github.com/devframes/devframe/tree/main/plugins/assets)