Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > GetMediaFileUrl in Transformation View modes: 
User avatar
Certified Developer 13
Certified Developer 13
jay@3degreesnorth.com.au - 2/3/2014 11:41:32 PM
GetMediaFileUrl in Transformation

I'm trying to use this function in a transformation:

<%# GetMediaFileUrl(Eval("FileGUID") ,Eval("FileName")) %>

However when I set up the document type that this transformation is transforming I only added a single property (called screenshot) using the text field with the Media Selector form control. There is no filename property. Do I need to create another property called "Filename" to be able to use this function?



User avatar
Kentico Consulting
Kentico Consulting
Kentico_RichardS - 2/4/2014 3:34:35 AM
RE:GetMediaFileUrl in Transformation

Thank you for your message.

There seems to be some issues with this transformation method. I recommend you to create the link yourself. If you want to display e.g. image which is stored in Media Selector form control try building this url:

<img src="domain/getfile/<%# Eval("MediaSelector") %>/filename.aspx">">

The filename can be anything, it really doesnt matter what is there, the important is the guid.

Kind regards,
Richard Sustek