API
Version 7.x > API > Resolving URLs View modes: 
User avatar
Member
Member
Jonathontek-gmail - 12/23/2012 3:50:16 AM
   
Resolving URLs
I am trying to retrieve files that are stored in a media library and display them on a page by constructiing their URL and passing it to a literal. I am using MediaLibraryHelper.GetMediaFileUrl which is returning me the correct URL but I only get a 404. I have looked with Google inspector and the file is not found. Can someone offer me some suggestions? The formats that I am trying to retrieve are .jpg & .mp4 Thanks.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 12/23/2012 10:07:44 AM
   
RE:Resolving URLs
Hi,

is the media file url working correctly if you add .aspx extension at the end of URL? In that case you need to configure extensionless on your site so that .jpg and .mp4 extensions would be resolved correctly.

Best regards,
Ivana Tomanickova