Skip to content

DAM 24.1

Version 24.1
Release Date 25 June 2024

Changes

New features

New package Bizzkit.Sdk.Dam.Helpers

The NuGet package Bizzkit.Sdk.Dam.Helpers is a convenience package, It have been added on top of the Bizzkit.Sdk.Dam to ease the integration to Transformation functions.

Services and helpers in the package are capable of constructing the same URLs as described in the documentation, using either string manipulation or the DAM api depending on the amount of information provided.

Based on the setup, there are now different ways of constructing image URLs. While the first is the more performant one, the latter might be easier if the URL is constructed at a point where not all data is available.

Without the Bizzkit.Sdk.Dam.Helpers:

var myUrl = $"{myCDNUrl}/{fileOrCroppingId}/{transformationFunctionId}/{fileNameWithoutExtension}.webp";

String manipulation using the helper:

var helper = provider.GetRequiredService<IImageUrlHelper>();
var myUrl = helper.GetUriToTransformedImage(new ImageUrlRequest
{
    CdnUrl = myCDNUrl,
    FileId = fileId,
    CroppingId = croppingId,
    TransformationFunctionId = transformationFunctionId,
    FileName = fileName,
    OutputFormat = TransformationFunctionModelOutputFormat.WebP,
});

Using the service relying on the DAM API:

1
2
3
4
5
6
7
var helperService = provider.GetRequiredService<IImageUrlHelperService>();
var myUrl = await helperService.GetUrlsAsync(new IncompleteImageUrlRequest
{
    TransformationFunctionId = transformationFunctionId,
    FileId = fileId,
    CroppingId = croppingId
}, CancellationToken.None);

Additional fields on the request are optional but the method call is faster the less data needs to be collected from the DAM api.

The new helpers can be added to an ServiceCollection by calling:

1
2
3
4
5
6
serviceCollection.AddBizzkitDamUrlHelper(opt =>
{
    opt.FetchMissingFileNames = true;
    opt.DefaultUICulture = "en-GB";
    // opt.AssumeWebP = false; Set to false if different output transformation types are used and the output types are not stored locally.
});

This is assuming a IDamClientFactory is available in the service collection:

New API endpoint POST /api/attributes-values/search

It is now possible retrieve attribute values for up 1000 products at time using a highly performant endpoint.

Enhancements

None

Deprecations

None