A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
This code should work. However, haven't tried it on files.
string mappedUrl;
if (PermanentLinkMapStore.TryToMapped(linkItem.Href, out mappedUrl))
{
var url = new UrlBuilder(mappedUrl);
var contentReference = PermanentLinkUtility.GetContentReference(url);
}
But I guess there is new and better approach, maybe with UrlResolver...
I'm looking to retrieve the ContentReference for a file in a LinkItem, but I'm struggling on how to do it. ContentReference.Parse seems only to work when the LinkItem refers to a page.
Anyone who has any pointers on where to look?