Use CDN for your blob storage providers
You can use CDN with your blob storage in two ways:
- You create a new provider and add CDN parameters to it. You can use this scenario, if you want to configure specific libraries to use CDN.
To do this perform procedures Create a new blob storage provider, Add CDN parameters to an existing blob storage provider, and Configure a library to use the CDN blob storage provider below.
- You can use an existing provider and add CDN parameters to it. You use this scenario, if you want to configure the libraries that use this provider to use CDN.
To do this perform procedure Add CDN parameters to an existing blob storage provider and optionally for additional libraries Configure a library to use the CDN blob storage provider below.
RECOMMENDATION: We do not recommend using CDN with the default File system and Database provides. If you do this, all existing content that is located on the file system or on the database will be served through the CDN, including the system images. We recommend to create a new blob storage provider and configure the CDN settings, create new library that will use it, and move the public items from default library to the new library.
NOTE: Sitefinity's blob storage providers work with images, videos and documents (the default Sitefinity CMS provider works with all three of these item types). By adding the CDN parameters to a provider all of its item types will be served through the CDN. If this is your intended scenario, make sure your CDN can handle the different item types of the provider.
Create a new blob storage provider that uses CDN
To create a blob storage provider:
- In Sitefinity CMS backend, navigate to Administration » Settings » Advanced » Libraries » Blob storage » Blob storage providers and select Create new.
- Enter values for Name, Title, and Description.
- In the ProviderType input field enter:
Telerik.Sitefinity.Modules.Libraries.BlobStorage.OpenAccessBlobStorageProvider, Telerik.Sitefinity
- Select the Enabled checkbox.
- Click Save changes.
- Expand the node of the blob storage you just created and click Parameters » Create new.
- In the Key field enter applicationName
- In the Value field enter /Blob
- Click Save changes.
Add CDN parameters to an existing blob storage provider
To add CDN parameters:
- Navigate to Administration » Settings » Advanced » Libraries » Blob storage » Blob storage providers.
- Expand the node of the blob storage with which you want to use CDN and click Parameters » Create new.
- In the Key field enter cdn
- In the Value field enter the address to your CDN storage.
For example: http://myaccount.cloudfront.net
- Click Save changes.
- Restart your web application.
As a result, your CDN blob storage provider is activated.
Configure a library to use the CDN blob storage provider
To change the blob storage provider for an existing library, perform the following:
- Click the Actions link of the library whose items you want to use the CDN blob storage provider and from the dropdown, select Move to another storage.
In the Blob storage provider dropdown box all available storage providers appear.
- Select the newly created CDN blob storage provider and click Move Library.
As a result, your library is configured to use the CDN blob storage provider and content items from that library are retrieve from the CDN.