Document Manager and Filenames with non-printable characters

4 posts, 1 answers
  1. Cameron
    Cameron avatar
    28 posts
    Member since:
    Oct 2011

    Posted 02 Apr 2012 Link to this post

    Hi,

    Today we had an interesting problem that I'm hoping you'll be able to help me fix.

    One of our clients, using the Rad Editor (ASP.NET), clicked on the Document Manager and the listing displayed no files.

    However the folder that was being accessed had 77 files.

    Upon trying to find out why they weren't being displayed, I discovered that one of the file names had a non-printable character in it.

    So, once I renamed the file the listing of files worked fine.

    The question is:
    How do I fix the filenames of files being uploaded so that files are not stored on our servers that may contain non-printable characters?
    And
    Even if they do contain non-printable characters, how do I get the Document Manager to display the folder of files anyway (with or without the offending file)?


    Thanks,
    Cameron
  2. Answer
    Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 05 Apr 2012 Link to this post

    Hi Cameron,

    I am not sure how a file name could contain non-printable characters but you can strip them in the StoreFile method of the FileSystemContentProvider of RadEditor.

    You can see how to implement a FileSystemContentProvider and use its StoreFile method in the following forum thread: RadEditor restricting image width and height.


    All the best,
    Rumen
    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.
  3. Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 05 Apr 2012 Link to this post

    Hi,

    You can also check this KB article: Giving the uploaded files unique names.

    Greetings,
    Rumen
    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.
  4. Cameron
    Cameron avatar
    28 posts
    Member since:
    Oct 2011

    Posted 05 Apr 2012 Link to this post

    Hi Rumen,

    Yeah, I had no idea that non-printable characters could go into a filename, but they were there.

    However now that I can check the filename prior to saving it, will solve it for me.

    Thanks,
    Cameron
Back to Top