Copied to clipboard

Flag this post as spam?

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


  • dharmbhav 4 posts 20 karma points
    Feb 22, 2009 @ 02:14
    dharmbhav
    0

    GETMEDIA() appends random numeric string to filename

    Hello everybody,

    I am new to umbraco. Hence my query can be due to my ignorance.

    I am using the following to render an image in an XSLT:


    However, GetMedia() returns the filename with random numbers appended to the actual file name.

    I am getting the following in the output:
    src="/media/1370/goldcross.jpg76225642005jpg"

    the name of the file is goldcross.jpg.

    Can somebody please help me?

    Cheers

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 22, 2009 @ 02:25
    Douglas Robar
    0

    Welcome to umbraco!

    The return value of GetMedia includes not only the filename, but also the size, dimensions, and filetype. Unless you specify which item you want the output jams all the pieces together.

    All you need to do is specify that you want the umbracoFile portion of the output, like this:



    cheers,
    doug.

  • dharmbhav 4 posts 20 karma points
    Feb 22, 2009 @ 23:36
    dharmbhav
    0

    Thanks a lot doug.

    Thanks again for your prompt reply.

    cheers,
    dharmesh

Please Sign in or register to post replies

Write your reply to:

Draft