Long filename problem

4 posts, 0 answers
  1. Harry
    Harry avatar
    7 posts
    Member since:
    Mar 2010

    Posted 15 Apr 2010 Link to this post

    I got a weird problem with filexplorer. After uploading files with a long filename the files are stored without a problem on the server (filename is correct) but when you try to view those files with fileexplorer the filenames are truncated at the second occuring blank in the filename. The full length of the path and filename is approx. 140 characters.

    Z:\Websites\xxxxxxx.xxxxxxxx.xx\html\clients\xxxxx\an xxxxxxxx\Regalbeschriftungen\Regalb Buch RGM 7430+7431+7432.doc
    works without a problem

    Z:\Websites\xxxxxxx.xxxxxxxx.xx\html\clients\xxxxx\an xxxxxxxx\Regalbeschriftungen\Regalbeschriftung Buch RGM 7430+7431+7432.doc
    shows as "Regalbeschriftung Buch"

    any ideas ?
  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 20 Apr 2010 Link to this post

    Hi Raffael,

    We are not aware of such problem and I was unable to reproduce it on our side. Could you please open a support ticket and attach a simple runnable project that reproduces the problem so we can investigate it further?

    On a side note, by design RadGrid (the grid component of RadFileExplorer) truncates the file name so it can fit into the cell. Could you try to resize the cell to see if it still displays truncated name?

    For your convenience I have uploaded a movie demonstrating my test using standard RadFileExplorer configuration.

    Best wishes,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Harry
    Harry avatar
    7 posts
    Member since:
    Mar 2010

    Posted 20 Apr 2010 Link to this post

    Thanks for your reply,
    I found that the + chars in the filename are a problem when opening files via java script ....
    the Handler.ashx only gets the full filename without any +
    RGM 7430+7431+7432.doc will be RGM 7430 7431 7432.doc ... which produces an error ...

    Do I need to urlencode item.get_url() ?

        <script type="text/javascript">  
            function buttonSubmit_Click() {
                var oExp = $find("<%= RadFileExplorer1.ClientID %>");
                var wm = GetRadWindowManager();
            function OnClientFileOpen(oExplorer, args) {
                var item = args.get_item();
                var fileExtension = item.get_extension();
                if (!item.isDirectory()) {
                    var requestImage = "Handler.ashx?path=" + item.get_url();
                    document.location = requestImage;
  4. Harry
    Harry avatar
    7 posts
    Member since:
    Mar 2010

    Posted 20 Apr 2010 Link to this post

    Fixed it ...

                    var requestImage = "Handler.ashx?path=" + encodeURIComponent(item.get_url());  
                    document.location = requestImage;  

    you should update your example file to include encodeURIComponent ... you'll never know what crazy filenames people are using .. especially MAC USERS (how I hate them) !

    PS: Continue this brilliant work !
Back to Top