Dynamic Path Settings to FileManager based upon the User selected Folder

Hi,

We are trying to achieve the dynamic rootfolder setting. Once the user logged into the application, user can able to change the root folder. Somehow we have achieved it, but when we are in Subfolder of  RootA and changing the rootfolder to RootB it's again calling the FileOperations for subfolder request. How can we cancel the subfolder request

1 Reply 1 reply marked as answer

IL Indhumathy Loganathan Syncfusion Team February 2, 2021 07:27 AM UTC

Hi Vasudevan, 
 
Greetings from Syncfusion support. 
 
We have checked your requirement with FileManager component. We suspect that you want to perform dynamic actions on root folder. We have set the root folder for FileManager component in sever side. So, we suggest you to change the root folder based on your user. 
 
Please, refer to the below code snippet. 
 
        public string user = "user1"; 
        public HomeController() 
        { 
            if (this.user == "user1") 
            { 
                // Map the path of the files to be accessed with the host 
                var path = HostingEnvironment.MapPath("~/Content/Files"); 
                // Assign the mapped path as root folder 
                operation.RootFolder(path); 
            } 
            else 
            { 
                // Map the path of the files to be accessed with the host 
                var path = HostingEnvironment.MapPath("~/Content/Files/Documents"); 
                // Assign the mapped path as root folder 
                operation.RootFolder(path); 
            } 
        } 
 
Please, refer to the below sample link. 
 
 
If we misunderstood your requirement, could you please share the below details. 
 
1.      Detailed explanation of your requirement. 
2.      Steps to replicate the issue. 
3.      If possible, please share us video or code block to replicate the issue. 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Indhumathy L 


Marked as answer
Loader.
Up arrow icon