Try our conversational search powered by Generative AI!

Fetch image URL using filename from CMS

Vote:
 

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:
 

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.