Adding a Digital Asset Manager (DAM) to your site enables you to store your images and other assets in an external service, separate from your content. DAMs improve site build times and allow you to reuse the same assets across different sites. With Azure Blob Storage and Azure CDN, you can host your own DAM while still managing your files directly from CloudCannon.
You will need an Azure account to use Blob Storage.
Settings in Azure#
You will need to configure the Resource sharing (CORS) settings in Azure Blob Storage to allow access from CloudCannon.
Add a CORS rule with https://app.cloudcannon.com
in the AllowedOrigins and GET, PUT
in the AllowedMethods.
Connecting your DAM to CloudCannon#
Open your site settings in CloudCannon. Navigate to Files / Assets. Under Link DAM, select New DAM.
Choose Azure Blob Storage as your DAM type and enter a name - this will be used to identify your DAM in CloudCannon.
Set Base URL to the domain name of your Azure CDN distribution or, if you chose to configure them, one of its alternate domain names.
Set Container name to the name of your container on Azure storage.
Enter your Storage account name and Access key.
Click Authenticate, to save and close the modal, then click Link DAM.
Attach metadata to uploaded files#
You can toggle the option to attach metadata to your files when they are uploaded. This could include the email address of the uploader and the file MIME type.
By default, the uploadedBy
metadata option is off for new DAMs. To enable this setting, you may need to update your "Resource sharing (CORS)" settings in Azure. Please ensure that the AllowedHeaders include x-ms-meta-uploadedBy
.
By default, the MIME type metadata option is on for new DAM. To enable this setting, you may need to update your "Resource sharing (CORS)" settings in Azure. Please ensure that the AllowedHeaders include x-ms-blob-content-type
.
To edit these settings, navigate to the Advanced Options section under Org Settings > Assets > Azure DAM. Enabling the metadata option will only affect files uploaded after the setting is applied.