Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 04, 2013 @ 13:26
    Fuji Kusaka
    0

    Displaying a umbracoExtensions using another alias

    Anyone can tell me how do i get to display the extension of an uploaded file under content if the alias am using is not umbracoFile ?

    I have certain nodes where user can upload pdf, xls and docs files but here am using another alias not umbracoFile and would like to have the extension being displayed on the front-end. But right now umbracoExtension only works with umbracoFile.

    Any idea how to add a new alias ?

  • Mike Chambers 621 posts 1203 karma points c-trib
    Nov 04, 2013 @ 13:50
    Mike Chambers
    2

    you could just revert to 

    new FileInfo(filepath).Extension;

    from the .net framework?

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 05, 2013 @ 08:10
    Fuji Kusaka
    100

    Thanks Mike,

    Or i can simply add this to my umbracoSettings.config

     <uploadField alias="myalias">
                  <lengthFieldAlias>umbracoBytes</lengthFieldAlias>
                  <extensionFieldAlias>umbracoExtension</extensionFieldAlias>
              </uploadField>
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies