Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

3.1

Add handler

Changes to web.config

DFS has its own handler for serving media files. To enable the handler:

Open your Sitecore's web.config file

, which by default will be here: C:\Inetpub\wwwroot\yoursite\Website.Before

. Before you start making changes, it is advised that you make a copy of

the 

the web.config file, so you always will have the

ability to

ability to fully recover.

3.1.1 Add handler

DFS has its own handler for serving media files. To enable the handler:

  • Navigate to the section "/configuration/system.webServer/handlers".

  • Now add the following handler, inside the handlers section.

    Code Block
    linenumbers
    languagexmltrue
    <add name="MediaHandler" verb="GET" path="dfsmedia/*/*-*" type="DFS.Client.Services.Handlers.MediaHandler"/>
  • Save the file and close it.
NoteIn you are running Sitecore 9.3 or newer, then you probably will have problems playing video assets in the content editor or the Dam for Sitecore Explorer. Please read this DFS 11.0 - Video playback failed because of Content Security Policy (CSP)

3.1.2 Content-Security-Policy

Our embedded Media Manager that are loaded in an IFrame must be added to the content security policy. Otherwise you will see a “This content is blocked” when opening the Media Manager or download asserts from the Media Manager.

  • Navigate to the section location/system.webServer/httpProtocol/customHeaders

  • Locate the header Content-Security-Policy, you must add all the Media Manager portal urls and the DAM api urls to the default-src. (Be aware that Digizuite can be configured with multiple portal and api urls, these urls can be received from your Digizuite consultant).

  • Example, here we added https://mm.example.com and https://api.example.com.

    Code Block
    <add name="Content-Security-Policy" value="default-src 'self' 'unsafe-inline' 'unsafe-eval' https://mm.example.com https://api.example.com; img-src 'self' data: https://s.gravatar.com https://*.wp.com/cdn.auth0.com/avatars; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' 'unsafe-inline' https://fonts.gstatic.com; upgrade-insecure-requests;" />

3.2 Setting up the connection to Digizuite™

Info

If you are upgrading from a previous version of DFS, then you can skip this section and continue with 3.2.2 Reverting silo item.

DFS synchronizes data from Digizuite™ DAM Center (DC) into Sitecore. Data is stored in a silo (item bucket)Before we can begin synchronizing, we have to fill out some config parameters telling Sitecore which DAM to fetch data from. There are 4 3 parameters in this file \App_Config\Include\damforsitecore\DFS.Settings.config. 

Code Block
linenumbers
languagexmltrue
<setting name="DFS.AssetSiloSettingsDigizuite.Default.BaseAddressMediaManagerUrl" value="{URL TO THEMEDIA DAM SERVERMANAGER}" />
<setting name="DFS.AssetSiloSettingsDigizuite.DefaultSync.Username" value="{USERNAME FOROF THE SYNC USER TO BE USED WHEN SYNCHRONIZING BETWEEN SITECORE AND DAM}" />
<setting name="DFS.AssetSiloSettingsDigizuite.DefaultSync.Password" value="{PASSWORD FOROF THE SYNC USER TO BE USED WHEN SYNCHRONIZING BETWEEN SITECORE AND DAM}" />
<setting name="DFS.AssetSiloSettings.Default.ConfigVersionId" value="{THE CONFIGVERIONID USED IN DAM}" />

We do not recommend that you change these 4 parameters in this file. Instead create a new config file where you patch the parameters (This is best practice). Here is an example of said the patch config file. It is important that the file is loaded after DFS.Settings.config, otherwise the patch file won't have any effect. If you name the config file z.DFS.Settings.config and place it in the folder \App_Config\Include\damforsitecore\ you should be safe.

Code Block
linenumbers
languagexmltrue
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
	<sitecore>
		<settings> 			
			<setting name="DFS.AssetSiloSettingsDigizuite.Default.BaseAddressMediaManagerUrl">
        				<patch:attribute name="value">https://dammm.digizuiteexample.dk/<com</patch:attribute>
      			</setting>			
			      		
            <setting name="DFS.AssetSiloSettingsDigizuite.DefaultSync.Username">
				              <patch:attribute name="value">DAM>DFS for Sitecore<System</patch:attribute>
			
            </setting>
			
            <setting name="DFS.AssetSiloSettingsDigizuite.DefaultSync.Password">
				              <patch:attribute name="value">sitecore<>6Jz7b6KBnFvdLW9y</patch:attribute>
			            </setting> 			<setting name="DFS.AssetSiloSettings.Default.ConfigVersionId">
				<patch:attribute name="value">!/5/</patch:attribute>
			</setting>		     
		</settings>
	</sitecore>
</configuration>
  • Edit the values in the file to match your site (use the below table):

Variable

Description

DefaultExampleBaseAddress

DFS.Digizuite.MediaManagerUrl

URL to your

DC. It MUST end with a forward slashhttps://[yourdam]/https://dam.digizuite.dk/UsernameUsername for the user to be used when synchronizing between Sitecore and your DAMDAM for SitecoreDAM for SitecorePasswordPassword for the user to be used when synchronizing between Sitecore and your DAMsitecoresitecoreConfigVersionIdThe ConfigVersionId of your DFS ConfigManager in your DC. It can be found here. It MUST have a "!" in front of it.![yourid]!/5/

Once the config file is in place, reload the site and continue to the next topic "Creating a silo in Sitecore".

3.2.1 Creating a silo in Sitecore

You now need to create a new silo in Sitecore. This has to be done to synchronize the content of your DAM and your Sitecore.

Do the following steps:

  • Be logged as a user who is admin or member of the role sitecore\Digizuite DAM for Sitecore Administrators 
  • Go to the Content Editor 
  • Expand Sitecore Media Library
  • Right click on Digizuite and click Insert → Asset silo

Image Removed

Add a name to the silo. Normally, you'd name the silo something that relates to your DC. By default, this will be the title of your silo. Everyone will be able to see this title.

Note
titleImportant note about the silo item

It is very important that the silo item is serialized to disk and controlled by your preferred item manager like Unicore or TDS. Every team member working on the solution should have the same starting point. For more info read this DFS 11.0 - 8 Calculated itemIds

3.2.2 Reverting silo item

If you are upgrading from a previous version, then you should have the Silo serialized to disk. Now it's time to revert the item back into your database with you preferred way of handling items like Unicore, TDS, or from the developer tab in Sitecore.

3.2.3 Considerations about silo item language(s)

The silo can be synchronized in multiple language (see guide DFS 11.0 - Setup multiple languages) or you can leave the silo only synchronized in one language and still be able to add content in other languages, see this guide DFS 11.0 - Optimize your DFS silo by limiting it to only one language. By default, DAM for Sitecore uses language fallback (not Sitecore's language fallback), which is set to "en".

Table of Contents

Table of Contents

...

Media Manager

DFS.Digizuite.Sync.Username

The username of the user to synchronize assets in the background

DFS.Digizuite.Sync.Password

The password of the user to synchronize assets in the background

Reload the site.

Table of Contents