Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Retaining File Extensions View modes: 
User avatar
Member
Member
jonas-asenmarketing - 7/28/2011 3:39:43 PM
   
Retaining File Extensions
Hello,
I have a custom document that contains an attached .mp3 file. When I render a link to the file in my transformation using GetFileUrl it displays with the .aspx extension. I need it to retain the .mp3 extension. Below is my workaround. Is there a better way to do this?


<a href="/getattachment/<%# Eval("ArtistSong1File") %>/<%# Eval("DocumentName") %>.mp3"><%# Eval("ArtistSong1Name") %></a>

Thanks,
Jonas Tankersley

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 7/29/2011 1:04:53 AM
   
RE:Retaining File Extensions
Hi,
you could set extensionless on your site and settingFile friendly URL extensions.

It depends how many mp3 files is on your site. If there is only few of them you could use your transformation work around.

Best regards,
Ivana Tomanickova