feat: use xpier media library for uploads and markdown embeds
Store media:ID in post bodies instead of CDN URLs, and keep sablog attach tokens as a fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Media library (xpier)
|
||||
|
||||
New uploads, covers, and in-body images/files use `xpier/filament-media-library`. Sablog Spatie media / `attachments` rows stay for import and legacy shortcodes.
|
||||
|
||||
## Markdown body (do not paste CDN URLs)
|
||||
|
||||
The editor writes a **stable reference**. The public URL is resolved only when the page is rendered.
|
||||
|
||||
| Format | Image | File |
|
||||
| -------- | ------------------ | ----------------------- |
|
||||
| Markdown | `` | `[notes.pdf](media:12)` |
|
||||
| HTML | `[media=12]` | `[media=12]` |
|
||||
|
||||
Admin flow: pick a file in **Insert from media library**, then click **Insert into body**. That appends the snippet above. Do not copy object-storage / CDN addresses into the article.
|
||||
|
||||
Legacy sablog tokens are unchanged: `[attach=ID]`, `{{attach:ID}}`, ``.
|
||||
|
||||
## Admin
|
||||
|
||||
- Library: `/admin/media-library`
|
||||
- Folders: `/admin/media-folders` (defaults: `general`, `articles`, `banners`)
|
||||
- Cover: `MediaPicker` bound to `coverMedia` / `cover_media_id`
|
||||
|
||||
## Config
|
||||
|
||||
```env
|
||||
MEDIA_DISK=public
|
||||
MEDIA_DIRECTORY=media
|
||||
MEDIA_VISIBILITY=public
|
||||
```
|
||||
|
||||
Run `php artisan storage:link` when using the `public` disk locally.
|
||||
Reference in New Issue
Block a user