To Get file extension of file which has uploaded in media library

priya tiwari asked on June 21, 2016 15:11

I have uploaded some excel and pdf files in a folder in media library. Now I am using media gallery for displaying all files. Here I want to differ displaying file is excel or pdf. My question is,how to get file extension of file which has uploaded in media library using transformation? I have tried with "GetMediaFileUrl()" but did not get correct path. Please suggest me how to resolve this issue?

Thanks in advance...

Recent Answers


Jan Hermann answered on June 21, 2016 15:44

You can use <%# Eval("FileExtension") %> in your transformation get the extension.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.