Copied to clipboard

Flag this post as spam?

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


  • pat 124 posts 346 karma points
    May 09, 2011 @ 15:41
    pat
    0

    how to get path of Media file

    I have media folder and saved csv file in it. How do I get file path from c# code so that I can read the file in the code (usercontrol)

     

    I have used this but that not working

     

     

     

     

    XPathNodeIterator

     

     

     

    xfilep = umbraco.library.GetMedia(1136, true

    );

     

    XPathNodeIterator nodes = xfilep.Current.Select("/node/data[@alias='umbracoFile']"

    );

     

    string p = string

    .Empty;

     

    while

    (nodes.MoveNext())

    {

    p = nodes.Current.Value;

     

    break

    ;

  • pat 124 posts 346 karma points
    May 09, 2011 @ 15:43
    pat
    0

    XPathNodeIterator xfilep = umbraco.library.GetMedia(1136, true);
    XPathNodeIterator nodes = xfilep.Current.Select("/node/data[@alias='umbracoFile']");
    string p = string.Empty;
    while (nodes.MoveNext())
    {
     p = nodes.Current.Value;
     break;
    }

  • Sean Holmesby 61 posts 82 karma points
    May 10, 2011 @ 07:31
    Sean Holmesby
    0

    It looks like you're doing this in .NET, so maybe you should ask this in the API forum.

    (Sorry, I've never used the API, only XSLT, so I can't help)

Please Sign in or register to post replies

Write your reply to:

Draft