Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > File path instead of URL View modes: 
User avatar
Member
Member
philip.proplesch - 11/10/2009 3:07:18 AM
   
File path instead of URL
Hello everybody,

I´m currently working on a site in which I use the 'Media gallery' webpart.
Is it possible to use the file path instead of the URL for the images? Currently it looks like:

http://mysite.tld/getmedia/c6fda93d-87c5-4cb0-825d-04edcaddc9e3/1.aspx

I don´t like this and look for a way to take the path:

http://mysite.tld/media/MyLibrary/Folder1/1.jpg

Any ideas how to solve this?

Best regards,
Philip Proplesch

User avatar
Member
Member
philip.proplesch - 11/10/2009 3:32:00 AM
   
RE:File path instead of URL
Just an addition:

Site Manager -> Administration -> Media libraries -> Use permanent URLs is not checked and I´m using Kentico 4.1.3513.

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 11/10/2009 4:49:17 AM
   
RE:File path instead of URL
Hi,

Please set Display active content to True and Use secure links property to False of your media gallery web part. Then please open ~\CMSModules\MediaLibrary\Controls\LiveControls\MediaFilePreview.ascx.cs file and find line about 166 with following code:

url = MediaFileInfoProvider.GetMediaFileUrl(mfi.FileGUID, mfi.FileName)
;

Please change this line of code to following one:

url = MediaLibraryHelper.GetMediaFileUrl(mfi.FileGUID.ToString(), si.SiteName);

I hope this will help you.

Thank you for letting us know about this issue. Regrettably, this seems to be a bug in the current version. I'm very sorry for this inconvenience. We will try fix it in the nearest version or in the next hotfix package for this particular Kentico CMS version.

Best regards,
Miroslav Remias.

User avatar
Member
Member
philip.proplesch - 11/10/2009 5:11:58 AM
   
RE:File path instead of URL
This works fine. Thank you!