volume_up

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

volume_up

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

Get MediaData from url (7.5)

Hi,

Simple question with hopefully a simple awnser, how can I get the media data object for an image when I have the url to the image? Or in another way, how do I get the content reference for a url?

/Viktor

#79496
Dec 18, 2013 22:56
Vote:
<p>As expected it was simple,</p> <p>----------</p> <p>var resolver = ServiceLocator.Current.GetInstance&lt;<span>UrlResolver&gt;</span>();</p> <p>var contentRef = resolver.Route(new UrlBuilder(url));</p> <p>---------</p> <p>/Viktor</p>
#79522
Edited, Dec 19, 2013 11:19
error This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.