Skip to content

Add Admin MCP media upload + blog hero attach - #515

Merged
shanerbaner82 merged 2 commits into
mainfrom
feature/admin-mcp-media-upload
Sep 12, 2026
Merged

shanerbaner82 merged 2 commits into
mainfrom
feature/admin-mcp-media-upload

Conversation

@shanerbaner82

Copy link
Copy Markdown
Contributor

Summary

  • Adds admin-upload-media for base64 hero uploads to the same Filament path (public disk, blog/heroes), re-encoded as WebP, with optional one-shot attach via article_id/slug.
  • Extends admin-update-blog-post to set hero from media_id/hero_image_path or hero_image_url (no auto-publish; published slug changes still refused).
  • Regenerates OG/card/header crops via existing ArticleImageService after attach.

Test plan

  • AdminUploadMediaTest — validation, upload, optional attach, update-from-media_id, update-from-URL
  • Existing AdminMcpOAuthTest update/list assertions still green
  • Pint on touched files
  • Manual: OAuth admin MCP upload a ~150–300KB WebP hero and confirm Filament edit page shows it

Growth can set Filament blog heroes via admin-upload-media (public disk blog/heroes WebP) and admin-update-blog-post (media_id/path or URL) without emailing support.
Default uploads to website-images; callers must pass directory blog/heroes for article hero attach. Sanitize relative paths and reject traversal.
@shanerbaner82
shanerbaner82 merged commit eb69f90 into main Sep 12, 2026
3 checks passed
@shanerbaner82
shanerbaner82 deleted the feature/admin-mcp-media-upload branch September 12, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant