Versions Compared

Key

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

...

The new dfsmedia pipeline is implemented as a httphandler,Ā using a pipeline in Sitecore. This pipeline is located in the DFS.Services.config file:

Code Block
firstlinetitleDFS.ServicesSettings.config
 <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
	<pipelines>     
	 <DFS.Services.DFSMedia>
        <processor type="DFS.Services.Pipelines.DFSMedia.CheckSecurity, DFS.Services" />        
        <processor type="DFS.Services.Pipelines.DFSMedia.GetMediaFromCache, DFS.Services" />
        <processor type="DFS.Services.Pipelines.DFSMedia.GetMediaPrerequisites, DFS.Services" />
        <processor type="DFS.Services.Pipelines.DFSMedia.GetMediaFromDigizuite, DFS.Services" />
        <processor type="DFS.Services.Pipelines.DFSMedia.ResizeImage, DFS.Services" />
        <processor type="DFS.Services.Pipelines.DFSMedia.SaveToCache, DFS.Services" />        
     </DFS.Services.DFSMedia>
    </pipelines>
  </sitecore>
</configuration>

Each step is explained as follows:

Pipeline nameDescription
DFS.Services.Pipelines.DFSMedia.CheckSecurity

This pipeline looks up the asset in the index using the context user.

If the user does not have access, the asset is not returned and the pipeline is stopped.

DFS.Services.Pipelines.DFSMedia.GetMediaFromCacheThis pipelines constructs a unique name based on the request and checks if the requested asset exists in the cache.
DFS.Services.Pipelines.DFSMedia.GetMediaPrerequisites

If the asset is not cached, it needs to be requested from Digizuite.

This pipeline gets all the prerequisites for requiring the asset in Digizuite

DFS.Services.Pipelines.DFSMedia.GetMediaFromDigizuiteThis pipeline executes the request towards Digizuite
DFS.Services.Pipelines.DFSMedia.ResizeImageIf a resize or #compres?? is requested, the bytes are processed here
DFS.Services.Pipelines.DFSMedia.SaveToCache

This pipeline saves the image to the cache

...