MediaCockpit DAM icon

MediaCockpit DAM

Interact with MediaCockpit DAM REST API

Download Asset

AI-generated

Summary

Download an asset file from MediaCockpit DAM by its asset ID, optionally retrieving a derivative (thumbnail or preview) instead of the original file.

Inputs

  • Asset ID (required) — The ID of the asset to download.
  • Download Derivative — Whether to download a derivative (thumbnail/preview) of the asset instead of the original file (default: false).
  • Derivative Group — The group name of the derivative to download, used only if downloading a derivative (default: 'Preview').
  • Derivative Type — The type of the derivative to download within the specified group, used only if downloading a derivative (default: 'large').

Output shape

output contains each input item with added binary data named 'data', including the downloaded file contents and associated metadata in JSON fields.

The node fetches the asset's binary content from the MediaCockpit API, handling cases where the API responds with JSON metadata (indicating errors) or streaming binary file data. It attempts a fallback URL if the first download URL returns JSON. Upon successful download, it prepares the binary data and includes debug information such as final filename, content type, file size, and initial bytes in the JSON output. Errors during download or parsing are reported as NodeOperationErrors with detailed messages.

Examples

Example 1: Downloading an original asset by its ID without derivatives

Set 'Asset ID' to the desired asset ID, leave 'Download Derivative' unchecked (false). The binary file data of the original asset is returned.

Example 2: Downloading a 'large' preview derivative of an asset

Set 'Asset ID' to the asset's ID, check 'Download Derivative' to true, specify 'Derivative Group' as 'Preview' and 'Derivative Type' as 'large'. The node returns the binary data of the specified derivative preview image.

Links

Discussion