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

RadFileExplorer Opening files with special characters in the file name

1 Answer 182 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Bryan Strader
Top achievements
Rank 2
Bryan Strader asked on 02 Dec 2010, 10:51 PM
I have implemented a solution that uses the RadFileExplorer and CustomFileSystemProvider similar to what is in this post:

http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx

My issue is that when I try to open a file that has a number sign in the file name, the URL path that is passed to the FileSystemHandler.ashx is poorly formed, and loses everything after the first '#' character. I don't expect to see these kinds of characters in our file names, but this one was a valid file and breaks the FileSystemHandler.ashx at the response.write, because the path to the file is invalid.

Is there a way to intercept this file path URL and ensure that it stays well formed. I noticed in the OnClientFileOpen client event, the url looks fine, so checking it here doesn't help. It isn't until its passed to the handler code that it is missing data....

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 08 Dec 2010, 08:17 AM
Hello Bryan,

You have to make sure that the URL is encoded. On the server you can use this method in order to encode the string.
If you need to encode the URL on the client, then you can use the escape JavaScript method in order to get the encoded URL.

In both cases, you can use the UrlDecode method in order to retrieve the actual URL on the server

Regards,
Fiko
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
FileExplorer
Asked by
Bryan Strader
Top achievements
Rank 2
Answers by
Fiko
Telerik team
Share this question
or