Configure the Media Integration widget

When using the Media Integration widget, the regular Cloudinary Assets subapp is hidden. Instead, Cloudinary content is managed within the Choose Dialog.

Prerequisites

To use this module you need to have an existing Cloudinary account.

The Cloudinary Media Integration widget requires a specific activation flag in the Cloudinary instance. Without the activation flag, the widget displays a login screen.

What do you need to do?

You must submit a request to Cloudinary to enable the flag on your instance. The flag is called CMS Signature Login Enabled.

Why is it needed?

The "Signature" authentication method in Cloudinary generates secure signatures for requests to its API. This helps ensure that only authorized users are able to access and manipulate resources stored on Cloudinary.

From your Cloudinary account, you need the following:

  • cloudName

  • apiKey

  • userName

  • apiSecret

This information needs to be entered either in the Passwords app under the /cloudinary/default folder or as a decoration in your light module.

Passwords app

cloudinary account admincentral

Decorate config.yaml

Available from version 1.2

This should be done via a decorations registry in your own light module.

The decorations you define impact the Media Integration widget’s config.yaml file.

  • From 1.3.0

  • Before 1.3.0

config.yaml
accounts:
  default: (1)
    apiKey: CLOUDINARY_API_KEY_HERE
    apiSecret: CLOUDINARY_API_SECRET_HERE
    cloudName: CLOUDINARY_CLOUD_NAME_HERE
    userName: CLOUDINARY_USERNAME
  assetManager: (2)
    apiKey: CLOUDINARY_API_KEY_HERE
    apiSecret: CLOUDINARY_API_SECRET_HERE
    cloudName: CLOUDINARY_CLOUD_NAME_HERE
    userName: CLOUDINARY_USERNAME
  assetViewer: (2)
    apiKey: CLOUDINARY_API_KEY_HERE
    apiSecret: CLOUDINARY_API_SECRET_HERE
    cloudName: CLOUDINARY_CLOUD_NAME_HERE
    userName: CLOUDINARY_USERNAME
1 Default fallback role.
2 Defines the role to which you can add users.
config.yaml
accounts:
  default: (1)
    apiKey: CLOUDINARY_API_KEY_HERE
    apiSecret: CLOUDINARY_API_SECRET_HERE
    cloudName: CLOUDINARY_CLOUD_NAME_HERE
    userName: CLOUDINARY_USERNAME
  superuser: (2)
    apiKey: CLOUDINARY_API_KEY_HERE
    apiSecret: CLOUDINARY_API_SECRET_HERE
    cloudName: CLOUDINARY_CLOUD_NAME_HERE
    userName: CLOUDINARY_USERNAME
1 Default user.
2 Specifies a superuser user.
Expected directory structure
your-light-module/ (1)
├── decorations/ (2)
│   └── cloudinary-media-widget-integration/ (3)
        └── config.yaml (4)
1 From within your own light module.
2 The decorations registry.
3 This tells Magnolia to decorate the cloudinary-media-widget-integration module.
4 Use the config.yaml file to decorate as you see fit.

For more on decorating via light modules, see Definition decoration.

Configure server

  1. First modify your server URL in AdminCentral.

  2. Under config/server, change the defaultBaseUrl property to point your own instance and contextRoot.

Override default account

From Cloudinary External DAM module version 1.3.0 and later, this feature no longer works. This is because credentials are role-based instead of user-based from 1.3.0.

You can override the default account settings by providing user specific settings.

Put the user specific account under the Magnolia username.

cloudinary account admincentral override

Installing this module hides the Cloudinary DAM app. To keep using the Cloudinary DAM app, you must manually enable it.

  1. Go to your Resources app.

  2. Navigate to "/cloudinary-media-widget-integration/decorations/dam-app-core/apps/dam.subApps.cloudinaryBrowser.yaml" file.

  3. Set "hidden" property to "false".

    cloudinary dam app enable

Usage

You can use a Magnolia field in any dialog:

form:
   implementationClass: info.magnolia.ui.javascript.form.FormViewWithChangeListener
   properties:
     image:
        label: Cloudinary Image
        $type: cloudinaryWidgetField

After opening magnolia dialog and clicking on select image button, you are presented with Cloudinary widget select dialog.

cloudinary image

Additional info

When installed, this module hides the Cloudinary Assets subapp and Cloudinary content in the Choose dialog by default.

  • To enable the Cloudinary Assets subapp, set closable to true for cloudinaryBrowser subapp in the DAM configuration yaml.

  • To enable the Cloudinary content in the Assets Choose dialog, set showCloudinaryContentInChooseApp to true for the cloudinary-media-widget-integration module configuration yaml.

For decorations to work consistently, you need to add the following in your light modules:
<light-module>/module.yaml
<light-module-name>/module.yaml
version: 1.0
dependencies:
  dam-cloudinary:
    version: 1.0/*
  cloudinary-media-widget-integration:
    version: 1.0/*
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Cloudinary External DAM module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules