upload_media
Upload files to Strapi media library from a public URL or base64 data. Supports images, documents, and videos with alt text and caption.
Instructions
Upload a file to the Strapi media library from a URL or base64-encoded data. Supports images, documents, videos, and any file type allowed by Strapi. Provide either a public file_url or base64 content along with a descriptive file name. The uploaded file can then be linked to content entries via relation fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caption | No | Caption or description for the media file. | |
| alt_text | No | Alternative text for accessibility. Recommended for all images. | |
| file_url | No | Public URL of the file to download and upload to Strapi (e.g., 'https://example.com/image.jpg'). Either file_url or file_base64 must be provided. | |
| file_name | No | File name including extension (e.g., 'photo.jpg', 'document.pdf'). Used for storage and display. | upload |
| file_base64 | No | Base64-encoded file content to upload. Use this when you have the file data directly rather than a URL. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |