microcms_upload_media
Upload media files to microCMS by providing base64 file data or an external URL. Returns the asset URL for use in content.
Instructions
Upload media files to microCMS using JS SDK (Management API). Supports two methods: 1) Upload file data (base64) with filename and mimeType, 2) Upload from external URL. Returns microCMS asset URL. Requires media upload permissions. Available on Team, Business, Advanced, and Enterprise plans.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serviceId | No | Service ID (required in multi-service mode, optional in single-service mode) | |
| fileData | No | Base64 encoded file data (for direct file upload) | |
| fileName | No | File name with extension (e.g., "image.jpg", "document.pdf") - required when using fileData | |
| mimeType | No | MIME type of the file (e.g., "image/jpeg", "application/pdf") - required when using fileData | |
| externalUrl | No | External URL of the file to upload (alternative to fileData) |