Get full path from uplad control

Thread is closed for posting
4 posts, 0 answers
  1. lakmal
    lakmal avatar
    76 posts
    Member since:
    Jun 2009

    Posted 23 Dec 2009 Link to this post

    Hi,

    How can i take full file path from upload control. ?
    this return  RadUpload1.UploadedFiles[0].FileName
    only file name

    lakmal
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Dec 2009 Link to this post

    Hi Lakmal,

    The client-site path is based on the browser that you are using. In IE6 and some older browsers FileName property of UploadedFile returns full path. Checkout the following forum link for more information.
    How to get a full path of each selection

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. lakmal
    lakmal avatar
    76 posts
    Member since:
    Jun 2009

    Posted 23 Dec 2009 Link to this post

    hi,

    I cant depend on browsers. That link is not hep me to get file full path

    lakmal
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 24 Dec 2009 Link to this post

    Hi lakmal,

    It is not possible to obtain the  file path on the client due to security reasons. In order to craft the serverside path for saving files you can use the following code:

    string fullPath = Path.Combine(Server.MapPath("Your upload folder"), uploadedFile.GetName());


    Greetings,
    Genady Sergeev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top