Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Get MediaData from url (7.5)



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?


Dec 18, 2013 22:56
<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>
Edited, Dec 19, 2013 11:19
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.