Versions Compared

Key

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

...

Field

Description

SiloId

This is the Id of the silo that has the asset requested.

AssetId

Is the Id of the asset that is requested.

Quality

Overrides the quality specified in the Sitecore field.

Quality supports both 'by name' and 'by id'

Resize

Only applies to image assets.

One of the concepts and principles when using a DAM system is to use specific qualities for every use. If images are needed in different sizes, it should be configured in Digizuite™ DAM.

However, there is a resize feature.

Width How wide the image will be in pixels.

Height How high the image will be in pixels.

By default a resize does not keep aspect ratio, but you can set an option to keep aspect ratio.

Compress

*

Only applies to image assets.

Indicates whether the asset should be saved using a worse quality, thereby reducing the physical size. 

from 0-100 is allowed, where 0 is the worst quality, but least physical storage.

Options

*

Options is a dash ("-") separate list and can contain these options:

download - Will download the asset requested.

keepaspectratio - Will enforce aspect ratio on from the original asset, if a resize is requested.

boxfit - If a resize ia requested and you supplyed both the width and heigth. The resized image will not exceed these values and still keep the aspectratio.

upscaleallowed - Will allow upscaling an image. The default is to disallow that.

...

Code Block
titleDFS.Settings.config
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
	<pipelines>     
	 <DFS.Services.DFSMedia>      
        <processor type="DFS.Client.Services.Pipelines.DFSMedia.SynchronizeAsset, DFS.Client.Services" role:require="Standalone or ContentManagement" />
        <processor type="DFS.Client.Services.Pipelines.DFSMedia.LoadAssetEntity, DFS.Client.Services" />        
        <processor type="DFS.Client.Services.Pipelines.DFSMedia.GetMediaFromCache, DFS.Client.Services" />
        <processor type="DFS.Client.Services.Pipelines.DFSMedia.GetMediaFromDigizuiteNewResizeImage, DFS.Client.Services" />
        <processor type="DFS.Client.Services.Pipelines.DFSMedia.ResizeImageGetMediaFromDigizuite, DFS.Client.Services" />        
        <processor type="DFS.Client.Services.Pipelines.DFSMedia.SaveToCache, DFS.Client.Services" />
        <processor type="DFS.Client.Services.Pipelines.DFSMedia.ResolveFilename, DFS.Client.Services" />
      </DFS.Services.DFSMedia>
    </pipelines>
  </sitecore>
</configuration>

...

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

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

Pipeline nameDescription
DFS.Client.Services.Pipelines.DFSMedia.SynchronizeAssetThis is only running in role:require="Standalone or ContentManagement". Will sync the asset into the asset silo if it does not exist.
DFS.Client.Services.Pipelines.DFSMedia.LoadAssetEntity

This pipeline looks Looks up the asset in the index using the context useritem.

DFS.Client.Services.Pipelines.DFSMedia.GetMediaFromCacheThis pipelines constructs a unique name based on the request and checks if the requested asset exists in the cache.
DFS.Client.Services.Pipelines.DFSMedia.NewResizeImageIf resize is requested, the image will be resized.
DFS.Client.Services.Pipelines.DFSMedia.GetMediaFromDigizuiteThis pipeline executes the request towards DigizuiteDFS.Client.Services.Pipelines.DFSMedia.ResizeImageIf a resize or #compres?? is requested, the bytes are processed here
DFS.Client.Services.Pipelines.DFSMedia.SaveToCache

This pipeline saves the asset to the cache

DFS.Client.Services.Pipelines.DFSMedia.ResolveFilenameSet the donwload filename header, if a download is requested.

...

ParameterTypeDescription
AssetSiloIdstringId of the asset silo from which the asset should be fetched
AssetIdstringId of the requested asset
FormatIdstringId of the format requested
DestinationIdstringDigizuite id of the destination - where to get the asset from
BaseUrlstringBaseUrl of the Digizuite
AccessKeystringAccessKey to the Digizuite
MimeTypestringMimetype of the requested asset
WidthstringIf a resize of the asset is requested, then this property contains the new width
HeightstringIf a resize of the asset is requested, then this property contains the new height
DownloadboolIf a download is requested, then this property is true
KeepAspectRatioboolif the aspect ratio should be kept, then this property is true
BoxFitboolIf true, the resized image will not exceed the width and height. Will keep aspectratio.
UpscaleAllowedboolif upscale is allowed, then this property is true
CompressstringIf the image should be compressed, then this has a value between 0 and 100

...

ParametertypeDescription
ResultPathstringPath to the directory in which the asset is cached
FileNamestringName of the cached asset
CachedboolBoolean to indicate whether the asset is cached
ResultStreamTask<Stream>Handle for the result stream used to get the asset from Digizuite
ResizeBytesbyte[]If the image is resized and/or compressed, this array contains the result bytes
DownloadUrlstringRedirect URL for download requests
StopPipelineboolIf the pipeline should be aborted, for instance due to security violation, then this is true
AssetAssetIndexableAsset model from the index
StatusCodeHttpStatusCodeStatus code used to indicate the request status.
DownloadFileNamestring
DigizuiteAssetStreamUrlstring
IsVideobool

Manually deleting cache entries

...