Skip to content

Instantly share code, notes, and snippets.

@davidknipe
Created June 22, 2023 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidknipe/2ba0727f1fb2aba5a9f3ea89f2fe62eb to your computer and use it in GitHub Desktop.
Save davidknipe/2ba0727f1fb2aba5a9f3ea89f2fe62eb to your computer and use it in GitHub Desktop.
EPiServer.Cms.WelcomeIntegration.Core.IDAMAssetIdentityResolver _damAssetIdentityResolver;
var damUrl = "https://images2.welcomesoftware.com/assets/UrlOfImageFromOptimizely.com";
DAMMetadata damMetadata = new DAMMetadata("Title of the asset", DAMAssetType.Image); // Swap to .Video if appropriate
var mappedIdentity = _damAssetIdentityResolver.Get(new Uri(damUrl), JsonSerializer.Serialize<DAMMetadata>(damMetadata), true);
var contentLinkToSave = mappedIdentity.ContentLink;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment