Actions2
Upload Media
AI-generatedOverview
This node uploads media files to a Media Kit API. It supports uploading media either from binary data available in the workflow or from a media URL. The node handles preparing the file metadata, initiating the upload via a resumable upload protocol, and completing the upload process. This is useful for workflows that need to programmatically upload media files to a remote media management service, such as uploading images, videos, or other media assets from local binary data or external URLs.
Use Case Examples
- Uploading an image file from binary data stored in a previous node to the Media Kit API.
- Uploading a media file directly from a URL to the Media Kit API without needing to download it manually.
Properties
| Name | Meaning |
|---|---|
| Binary Data Name | Name of the binary property in which the media data can be found. Used to specify the binary data to upload from the workflow. |
| Media URL | The URL to upload (must be a valid URI). Used to specify an external media URL to upload directly. |
Output
JSON
fileName- The original file name of the uploaded media.mimeType- The MIME type of the uploaded media file.fileExt- The file extension of the uploaded media.fileSize- The size of the uploaded media file in bytes.uploadedFileUrl- The URL where the uploaded media file is accessible after upload.
Dependencies
- Requires an API key credential for the Media Kit API (blockletComponentApi).
Troubleshooting
- Error if both binaryDataName and mediaUrl are provided: Only one of these can be used at a time.
- Error if neither binaryDataName nor mediaUrl is provided: The node requires one source of media data to upload.
- Error if mediaUrl is invalid: The URL must be a valid URI.
- Error if upload URL is not received from the server: Indicates a problem with the Media Kit API or network connectivity.
- Error if no URL found in the upload response: Indicates the upload did not complete successfully.