Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Fetch image URL using filename from CMS

Vote:
0

Hi,

I wanted to fetch the URL of image uploaded in CMS with Filename without using CMS property.

Kindly let me know the way to retrieve.

I am using EPiServer CMS 7.5

Thanks,

Manjeera T

#181861
Sep 01, 2017 7:17
Vote:
0

Try something like this.

var mediaContent = _contentRepository.Get<IContent>(contentLink);
var directDownloadUrl = mediaContent.DownloadUrl();
#181862
Sep 01, 2017 8:14
* 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.