Skip to content

feat: add upload-media-file ability for local image uploads - #3

Open
manutuero wants to merge 2 commits into
mainfrom
manutuero/no-hay-ability-para-subir-im-genes-desde-un-arch
Open

feat: add upload-media-file ability for local image uploads#3
manutuero wants to merge 2 commits into
mainfrom
manutuero/no-hay-ability-para-subir-im-genes-desde-un-arch

Conversation

@manutuero

Copy link
Copy Markdown
Member

Summary

  • Adds upload-media-file ability and MediaService::uploadMediaFromFile() so agents can upload editor-attached images via file_path instead of unreliable base64 payloads.
  • Clarifies when to use attach-images-to-draft, upload-media-base64, and upload-media-file in ability descriptions and docs/ABILITIES.md.
  • Adds wp-env integration checks in tests/upload-media-file.php.
  • Bumps plugin version to 0.2.0.

Closes #1.

Test plan

  • composer run lint passes
  • npx @wordpress/env run cli wp eval-file wp-content/plugins/wp-editorial-abilities/tests/upload-media-file.php prints PASS
  • MCP client discovers wp-editorial-abilities/upload-media-file
  • Upload with a readable local path returns media_id and sets alt_text / caption
  • Upload with an unreadable path returns wpea_file_not_readable

Adds a third image upload path so agents use file_path instead of
unreliable base64 payloads for editor-attached images. Closes #1.
@manutuero manutuero self-assigned this Aug 27, 2026
Keep issue #1 descriptions and alt_text/caption fields; accept main's
relative path hint and description fallback for backward compatibility.
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.

No hay ability para subir imágenes desde un archivo local — el agente cae en base64 y falla

1 participant