...
The syntax of the url is: dfsmedia/[SiloId]/[AssetId]-[Quality]/resize/[Width]x[Height]/compress/[0-100]/options/[Options]
...
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. upscaleallowed - Will allow upscaling an image. The default is to disallow that.Compress - Reduces the quality of the image which decreases the size. 0-100 is allowed, where 100 is full quality and size. |
Understanding the DigizuiteMediaCache
...
Each step is explained as follows:
Pipeline name | Description |
---|---|
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.GetMediaFromCache | This 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.GetMediaFromDigizuite | This pipeline executes the request towards Digizuite |
DFS.Services.Pipelines.DFSMedia.ResizeImage | If a resize or #compres?? is requested, the bytes are processed here |
DFS.Services.Pipelines.DFSMedia.SaveToCache | This pipeline saves the image to the cache |
This pipeline may be modified according to customer needs.
...
The object DFSMediaPipelineArgs contains a Request and a Result. These two objects has the following properties:
Request
Parameter | Type | Description |
---|---|---|
AssetSiloId | string | Id of the asset silo from which the asset should be fetched |
AssetId | string | Id of the requested asset |
FormatId | string | Id of the format requested |
DestinationId | string | Digizuite id of the destination - where to get the asset from |
BaseUrl | string | BaseUrl of the Digizuite |
AccessKey | string | AccessKey to the Digizuite |
MimeType | string | Mimetype of the requested asset |
Width | string | If a resize of the asset is requested, then this property contains the new width |
Height | string | If a resize of the asset is requested, then this property contains the new height |
Download | bool | If a download is requested, then this property is true |
KeepAspectRatio | bool | if the aspect ratio should be kept, then this property is true |
UpscaleAllowed | bool | if upscale is allowed, then this property is true |
Compress | string | If the image should be compressed, then this has a value between 0 and 100 |
Result
Parameter | type | Description |
---|---|---|
ResultPath | string | Path to the directory in which the asset is cached |
FileName | string | Name of the cached asset |
Cached | bool | Boolean to indicate whether the asset is cached |
ResultStream | Task<Stream> | Handle for the result stream used to get the asset from Digizuite |
ResizeBytes | byte[] | If the image is resized and/or compressed, this array contains the result bytes |
DownloadUrl | string | Redirect url for download requests |
StopPipeline | bool | If the pipeline should be aborted, for instance due to security violation, then this is true |
Asset | AssetIndexable | Asset model from the index |
StatusCode | HttpStatusCode | Status code used to indicate the request status. |