Filename + File path limit 255/260

7 posts, 0 answers
  1. Samir Gulrajani
    Samir Gulrajani avatar
    10 posts
    Member since:
    May 2005

    Posted 15 May 2012 Link to this post

    As per the post in this discussion:
    http://www.telerik.com/community/forums/aspnet/upload/is-there-a-max-filename-length.aspx 

    "The limit of 255 characters for Windows XP or 260 character limit for Windows Vista applies to the entire filepath and not just the filename"

    How can I check that on client side, and inform the clients that the filename along with file path is too long?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 May 2012 Link to this post

    Hello Samir,

    IE 6 & 7 are the only browsers that return the full path to the file. All other browsers including IE8 return only the file name. With reference to this forum thread, 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());

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Samir Gulrajani
    Samir Gulrajani avatar
    10 posts
    Member since:
    May 2005

    Posted 16 May 2012 Link to this post

    So, the limitation of 255/260 characters in full file name + path, is from server side and not client side?  In other words, if I can make sure - on the server side the path + filename does not exceed 255 characters, I should be good.  And even if clients try to upload files where the file path might be huge, but file name is small it should not be a problem.
    Example: 
        Client side:
                    file path (250characters) + filename (20characters)
        Server side:
                    file path (50 characters) + filename (20 characters)

    The above scenario will be fine, even now.  Is that true?

  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 18 May 2012 Link to this post

    Hello Samir,

    This is correct, the client-side name can be longer than 255 symbols, however, when saving to the serve one must truncate it to 255 symbols at max.

    Kind regards,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Saravanan Gopal
    Saravanan Gopal avatar
    4 posts
    Member since:
    Dec 2009

    Posted 29 Sep 2015 Link to this post

    Hi

    I using Radasyncupload . I am not able to upload more then 130 character file name .i am getting 414 error please help me.i need to upload 260 character file.Waiting for your quick reply

     

  7. Saravanan Gopal
    Saravanan Gopal avatar
    4 posts
    Member since:
    Dec 2009

    Posted 29 Sep 2015 Link to this post

    Hi
    I using Radasyncupload . I am not able to upload more then 130 character file name .i am getting 414 error please help me.i need to upload 260 character file.Waiting for your quick reply

  8. Saravanan Gopal
    Saravanan Gopal avatar
    4 posts
    Member since:
    Dec 2009

    Posted 01 Oct 2015 Link to this post

    Hi
    I using Radasyncupload . I am not able to upload more then 130 character file name .i am getting 414 error please help me.i need to upload 260 character file.Waiting for your quick reply
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017