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

Delete files from subfolders

2 Answers 88 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
onur
Top achievements
Rank 1
onur asked on 06 Aug 2009, 11:15 PM
Hi,
I trying to let users to delete files from subfolders but Only root level files are deletable. This is my code,


**********
string p1 = "~/Reports";
string p2 = p1 + "/Images";
string p3 = p1 + "/Documents";
var PathsRoot = new[] {p1};
var PathsAll = new[] { p1,p2,p3 };
RadFileExplorer1.Configuration.ViewPaths = PathsRoot;
RadFileExplorer1.Configuration.UploadPaths = PathsAll;
RadFileExplorer1.Configuration.DeletePaths = PathsAll;
***************

if i use "PathsAll" for ViewPaths the RadFile Explorer shows 2 Images folder and 2 Documents folder.
How can i let users to delete files from subfolders ?

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Fiko
Telerik team
answered on 07 Aug 2009, 12:38 PM
Hi Onur,

This is the expected behavior, because you set an array of 3 paths to the ViewPaths property. Respectively the FileExplorer control will explore these path in the Tree as different root folders.
I am not quite sure what is your requirement but bellow I placed an example configuration and explanation of the RadFileExplorer's behavior in this case:
 
string p1 = "~/Reports";  
string p2 = p1 + "/Images";  
string p3 = p1 + "/Documents";  
string[] viewPath = new string[] { p1 };  
string[] deleteAndUploadPath = new[] { p2, p3 };  
RadFileExplorer1.Configuration.ViewPaths = viewPath;  
RadFileExplorer1.Configuration.UploadPaths = deleteAndUploadPath;  
RadFileExplorer1.Configuration.DeletePaths = deleteAndUploadPath; 

This configuration assigns the following permissions to the folders :

  •  "~/Reports" is explored and it is visible including all of its subfolders
  • "~/Reports/Images" and "~/Reports/Documents" folders are upload destinations. Also the folders/files inside these folders can be deleted.
  • All of the paths that are outside of the above mentioned permissions are invisible or they are visible but the folders/files inside cannot be deleted. Upload is not allowed as well.

I hope this information helps.

Regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
onur
Top achievements
Rank 1
answered on 07 Aug 2009, 02:28 PM
Ok, Now it's clear,
File delete problem fixed by putting RadFileExplorer Paths configuration codes on pageLoad.

Thanks for your answer
Have a good day
Tags
FileExplorer
Asked by
onur
Top achievements
Rank 1
Answers by
Fiko
Telerik team
onur
Top achievements
Rank 1
Share this question
or