strapi_upload_media
Upload media from a URL to Strapi's media library, with format conversion and quality control. Add metadata like name, caption, and alt text. Requires explicit user authorization.
Instructions
Upload media to Strapi's media library from a URL with format conversion, quality control, and metadata options. IMPORTANT: This is a write operation that REQUIRES explicit user authorization via the userAuthorized parameter.
Upload Steps
Upload via strapi_upload_media with URL and metadata
Get image ID from response
Link to content using strapi_rest PUT request
Linking Images to Content (Strapi v5)
After upload, use PUT request to link: { "method": "PUT", "endpoint": "api/articles/{documentId}", "body": { "data": { "images": ["imageId"] } }, "userAuthorized": true }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes | The name of the server to connect to | |
| url | Yes | URL of the image to upload | |
| format | No | Target format for the image. Use 'original' to keep the source format. | original |
| quality | No | Image quality (1-100). Only applies when converting formats. | |
| metadata | No | ||
| userAuthorized | No | REQUIRED for media upload operations. Client MUST obtain explicit user authorization before setting this to true. |