The Media: Acquia DAM Drupal module provides bi-directional syncing of media between your Drupal 7-based website and Acquia DAM Classic.
This page covers the following topics:
Installing the connector module
To install the Acquia DAM connector, complete the following steps:
Download the 7.x version of the Media: Acquia DAM. module.
Install Media: Acquia DAM and Media: Acquia DAM Browser. For more information, see Install the module on your Drupal website.
Sign in to Acquia DAM Classic.
Create a dedicated background user and group for the routine syncing of metadata and to allow anonymous users to view assets in the asset viewer. Ensure that the dedicated group that you assign to your background user includes permissions for viewing and downloading the assets you plan to use with your Drupal website.
Edit your Drupal
settings.php
file, and replace[username]
and[password]
with the username and password of the background user you created in the previous step:$conf['media_acquiadam_background_user'] = '[username]'; $conf['media_acquiadam_background_pass'] = '[password]';
Important
Acquia recommends that you store your background user credentials in a file outside of a web accessible path. For more information, see Storing sensitive information outside of your codebase.
Configuring the connector module
Sign in to your Drupal website as a user with Administrator permissions.
In the top menu, click Configuration.
In the Media section, click Media: Acquia DAM settings.
In the Authentication tab, enter values for the following fields:
Client ID – Acquia DAM Classic client ID
Client Secret – Acquia DAM Classic client secret
Client mode – Select Mixed or Background only
When set to Mixed, a user authenticates with Acquia DAM Classic when selecting and viewing assets in the asset viewer. When set to Background only, only assets accessible to the background user in Acquia DAM Classic will be available for viewing and downloading by Drupal users.Note
If you do not have your Client ID or Client secret, contact your account manager.
Click the Caching tab, and then enter values for the following fields:
Used lifetime – Duration, in minutes, to cache asset information in Drupal. Some asset information stores locally for performance reasons. Acquia recommends setting the timeout as high as allowable. A value of
0
disables caching.Unused lifetime – Duration, in minutes, to cache asset information loaded while using the asset browser to improve performance. Acquia recommends a short timeout (five to 30 minutes) to avoid displaying outdated information to a user. A value of
0
will disable caching for unused assets.
Click the Media tab, and then enter values for the following fields:
Mimetype adjustment – Override the handling of a file type with that of a different file type. For example, you may want Drupal to handle an
eps
file like apng
file.
Click the Media browser tab, and then enter values for the following fields:
Results per page – Number of assets, not including folders, displayed per page of results in the asset browser.
Scroll to the bottom of the page, and then click Save configuration.
Ensure you create cron jobs to periodically refresh data.
You can also configure the fields described previously using Drush:
Option | Value | Drush command |
---|---|---|
| Acquia DAM Classic client ID |
|
| Acquia DAM Classic client secret |
|
| Must be either |
|
| Defaults to |
|
| Defaults to |
|
| Defaults to |
|
| Defaults to |
|
Adding a Content type field
Complete the following steps to add a content type field for your chosen content type:
Sign in to your Drupal website as a user with Administrator permissions.
In the top menu, select Structure.
Select Content types.
From your content type row, select Manage fields from the Operations menu.
For Add a new field, enter a label, such as
DAM asset
.Select Field type as File.
Select Widget as Media browser.
Select Save and then select Save field settings.
Scroll to the Enabled browser plugins section and select Acquia DAM Asset at the bottom of the page.
Add Allowed file extensions for uploaded files and enter the desired file extensions separated by spaces. For example,
jpg gif png svg pdf
.Select Save settings.
Assets
The Acquia DAM connector affects assets in the following circumstances and methods.
Asset thumbnails
The connector creates asset thumbnails in Drupal from Acquia DAM Classic. The maximum width or height is 1280 pixels. If the asset is a smaller dimension, a small thumbnail may be used. Deleting an asset in Acquia DAM Classic also deletes its thumbnail in Drupal.
Asset caching
For performance reasons, asset information (including name, thumbnail URLs, and expiration dates) are cached locally in Drupal. The asset cache is periodically refreshed by a cron job.
Note
The cache for the Acquia DAM connector is separate from the Drupal cache.
To clear the asset cache, complete the following steps:
Sign in to your Drupal website as a user with Administrator permissions.
In the top menu, click Configuration.
In the Media section, click Media: Acquia DAM settings.
In the Caching section, click Clear.
You can refresh the cache for an individual asset by viewing its entity page, and then clicking the Force refresh from Acquia DAM link.
Asset expiration
In Acquia DAM Classic, you can configure an expiration date for an asset. Upon expiration, the asset will no longer be usable in your Drupal website. There may be a delay between an asset expiring in Acquia DAM Classic and the Acquia DAM connector syncing that information with your Drupal website.
If an asset has expired in Acquia DAM Classic, but is still available in Drupal, you can force an update for the asset by viewing its entity page, and then clicking the Force refresh from Acquia DAM link.
Acquia recommends using an asset only in fields and embedded media items to ensure a consistent user experience when an asset expires.
Assets with unknown file types
If Drupal does not have a mimetype configured for an asset, it will display as an unknown type. To avoid unknown types, ensure that you configure your Drupal website with mimetypes for the assets that you intend to use.
Permissions
The Acquia DAM connector includes several permissions for managing what a user can do, including the following permissions:
Permission | Description |
---|---|
Administer Media: Acquia DAM | Allows the role to administer Acquia DAM Classic settings by using the configuration page. Only Drupal administrators should have this permission. |
View Acquia DAM assets | Allows the role to view Acquia DAM Classic assets. For most websites, all roles should have this permission. |
View expired Acquia DAM assets | Allows the role to access and edit expired assets in Drupal. This permission should be given to trusted roles only. The role will not be able to view the actual asset since that is controlled by Acquia DAM Classic. |
View Acquia DAM links | Allows the role to view links that go to the asset in Acquia DAM Classic. |
Access Media: Acquia DAM Browser | Allows the role access to the Media: Acquia DAM Classic asset browser. If the browser is configured to use Mixed mode, the user must still authenticate against Acquia DAM Classic. |
Search behavior
The Acquia DAM connector uses Acquia DAM Classic for executing search queries. A query is affected by the permissions assigned to the user in Acquia DAM Classic running the search. When searching a folder, results in child folders are also returned.
Note
Search results differ based on the Client mode setting. If set to Background only, only fields to which the background user has permissions for in Acquia DAM Classic can be searched. If set to Mixed, only fields for which the user has permissions in Acquia DAM Classic can be searched.
When making changes to an asset’s metadata in Acquia DAM Classic, there may be a delay before a search query reflects the change.