Cloudinary icon

Cloudinary

Upload to Cloudinary

Overview

This node allows updating existing assets in a Cloudinary account, specifically focusing on updating structured metadata for an asset. It is useful when you want to attach or modify detailed JSON-based metadata fields on your media assets (images, videos, raw files) stored in Cloudinary.

Typical use cases include:

  • Adding custom metadata fields to images or videos for better categorization or searchability.
  • Updating structured metadata after initial upload without re-uploading the entire asset.
  • Automating metadata management workflows in media-heavy applications.

For example, you might update an image asset with structured metadata like {"author": "John Doe", "license": "CC-BY"} to keep track of ownership and usage rights.

Properties

Name Meaning
Public ID The unique public identifier of the asset to update.
Resource Type The type of asset to update. Options: Image, Video, Raw.
Type The storage type of the asset. Options: Upload, Private, Authenticated, Fetch.
Structured Metadata JSON object containing key-value pairs of metadata to attach to the asset. Example: {"field1":"value1"}
Update Fields Additional options for the update operation. Currently supports: Invalidate CDN (boolean) to clear cached copies of the asset.

Output

The node outputs a JSON object representing the updated asset as returned by the Cloudinary API. This includes details such as the asset's public ID, resource type, tags, and the newly attached structured metadata fields.

No binary data output is produced by this operation.

Example output snippet (simplified):

{
  "public_id": "sample_asset",
  "resource_type": "image",
  "type": "upload",
  "metadata": {
    "field1": "value1",
    "field2": "value2"
  },
  ...
}

Dependencies

  • Requires a valid Cloudinary account with API credentials (cloud name, API key, and API secret).
  • The node uses these credentials to authenticate requests to Cloudinary's REST API.
  • No additional external dependencies beyond standard HTTP requests and JSON handling.

Troubleshooting

  • Invalid JSON for structured metadata: If the structured metadata input is not valid JSON, the node will throw an error. Ensure that the JSON is correctly formatted.
  • Authentication errors: Incorrect or missing API credentials will cause authentication failures. Verify that the API key, secret, and cloud name are correctly configured.
  • Asset not found: If the specified public ID does not exist, the API will return an error. Confirm the public ID and resource type are correct.
  • CDN cache issues: If updates do not appear immediately, consider enabling the "Invalidate CDN" option to clear cached versions of the asset.

Links and References

Discussion