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

Allow change of case in filename

1 Answer 38 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 01 Oct 2010, 10:29 AM

Hi.

In the fileExplorer, if you change a filename but only change the case of the name eg:
myfile.txt
To
MYFILE.txt

then the changes are not saved as it thinks the file already exists (it does in essence as I know it is trying to perform a move on the file, not a rename).

Is there a way to allow this so that if a file is uploaded with a filename that has the wrong case it can be changed?

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 06 Oct 2010, 11:40 AM
Hello James,

The best way to do this is to override the FileBrowserContentProvider's MoveFile method.
In your case I recommend you to subclass the default provider which ships with RdFileExplorer - Telerik.Web.UI.Widgets.FileSystemContentProvider. Then you need to override these methods:
  • GetFileMethod - this method is called in order to determine whether a file exists or not. If the method returns null, this means that the file does not exists
  • MoveFile method - in order to achieve the desired result

Then you can set the new provider to the RadFileExplorer control.

Greetings,
Fiko
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
Tags
FileExplorer
Asked by
James
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or