This is a migrated thread and some comments may be shown as answers.

Document Manager and Filenames with non-printable characters

3 Answers 36 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Cameron
Top achievements
Rank 1
Cameron asked on 02 Apr 2012, 05:52 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 05 Apr 2012, 10:46 AM
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.
0
Rumen
Telerik team
answered on 05 Apr 2012, 11:03 AM
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.
0
Cameron
Top achievements
Rank 1
answered on 05 Apr 2012, 10:17 PM
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
Tags
Editor
Asked by
Cameron
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Cameron
Top achievements
Rank 1
Share this question
or