Issues on File Manager when root folder is dynamically set

Hi,

We are currently trying out an implementation where an authorized user can access files and folders of different client users. Here's how the proposed folder structure currently looks like.

- Root uploads folder
     - Client1
          - C1_Folder1
          - C1_Folder2
          - C1_Folder3
     - Client2
          - C2_Folder1
          - C2_Folder2
          - C2_Folder3

The authorized user can then access the client folders and files by selecting a client folder from a dropdown. When the page loads, since the user has not selected a client folder yet, I have set it to the first client on the list (Client1). Client1's folder and files will be displayed during the initial load of the page and file manager. Here's a screenshot of how it looks like on initial load.



However, after switching the root folder of the File Manager from Client1 to Client2, through the aforementioned dropdown selection, I noticed a couple of items. Here's the screen after switching client folder from Client1 to Client2.



1. Folders in tree view for Client2 is not displayed. Is there a way to display Client2's folders in tree view after changing the File Manager root folder to Client2's folder?

2. When trying to expand the tree view of Client2, the File Manager has been set in an infinite loading state. None of the elements of the File Manager can be clicked. Screenshot below. I think this is very much related to item number 1.



3. Check the label under the Refresh button from the toolbar. We are in Client2 folder but the label of the breadcrumb element still says Client1. I think this may be a bug.

An additional query unrelated to the above issues:

1. If you will check the provided code FileTest.razor, under the OnClientChange method, I am creating a new BeforeSendEventArgs to be passed into the OnSend method. I am curious as to what is the official way to get the existing File Manager's FileManagerAjaxSettings as the FileManager.AjaxSettings property is already deprecated.

Hope you can help me again on my queries.

Best regards,



Attachment: FileManagerTest_3ad4b01c.zip

9 Replies 1 reply marked as answer

IL Indhumathy Loganathan Syncfusion Team May 10, 2021 03:45 PM UTC

Hi Denzel, 
 
Greetings from Syncfusion support. 
 
We have validated your queries in File Manager component.  
 
Query 1: Switch the root folder of FileManager based on dropdown selection 
 
We are able to reproduce the reported issue and we need some additional time to validate further on this issue. We will update you further details within two business days on 12th May, 2021. 
 
Query 2: Event call inside an event 
 
The OnSend event of File Manager triggers only before sending the AJAX request to the server while performing operations. Please share the exact scenario, in which you want to invoke this onSend event inside another external event. Please share more details regarding your use case scenario which will help us to assist you promptly. 
 
Regards, 
Indhumathy L 



RS Roy Sunga May 10, 2021 04:29 PM UTC

Hi Indumathy,

For query number 2, I was triggerring the OnSend event inside the OnChange event callback for when the dropdown select value is changed. OnSend method is being called in order to set the root folder dynamically using the value selected from the dropdown. Based on my understanding, the OnSend event triggers the FileOperations controller method, where my code for assigning the new root folder path is in place. This needs to be called everytime a new value is selected from the dropdown. You can visit the Razor code that I have included in the file that I have attached for the implementation.

Actually I was asking about a way to get the existing FileManagerAjaxSettings from the existing File Manager component in order to construct a new BeforeSendEventArgs which is a required parameter for the OnSend event of the File Manager. Kindly advise as to how I can achieve this as using the SfFileManager<TValue>.AjaxSettings property is tagged as deprecated.

Let me know if you need further info regarding the required setup.


IL Indhumathy Loganathan Syncfusion Team May 11, 2021 12:49 PM UTC

Hi Denzel, 
 
Please find the answer for your queries. 
 
Query 1: OnSend Event call inside another event 
 
Thanks for the details.  
 
We understood that you want to trigger the OnSend event of FileManager for each dropdown selection. As mentioned earlier, the OnSend event will be triggered while performing file operation. To call the OnSend event inside dropdown selection event, you need to perform file operation inside that event. For your scenario, we suggest you to use RefreshFilesAsync method inside the OnChange event of dropdown, which will trigger the OnSend event. 
 
Kindly check the below video where we demonstrated the behavior for your reference. 
 
 
Query 2: Switch the root folder of FileManager based on dropdown selection 
 
We have validated the issue “Switching root folder of FileManager based on dropdown selection” and considered this as a bug in our end. The fix for this issue will be included in our first week patch release of June, 2021. You can track the status through the below link. 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Indhumathy L 


Marked as answer

UN Unknown August 31, 2021 06:55 AM UTC

Query 2: Switch the root folder of FileManager based on dropdown selection 


Questions.


I have set the root folder dynamically.

The operation is completed in the first root folder path

If you try to work after selecting the second root folder

Searching for the first selected path, an "overflow" occurs and the program exits.

Is there any way to solve this?

/files/{rootfolderPath name}/{number}/0/"PATH"

PATH value remains


  1.  first root folder path



2. second root path (There is no [TEST_EVIDENCE] folder in the second path. But I keep searching.)

Please let me know if there is a way to initialize "filemanager" 

"RefreshFilesAsync" cannot solve it.



IL Indhumathy Loganathan Syncfusion Team September 1, 2021 04:43 PM UTC

Hi ArcBlue, 
 
We have validated your reported query in File Manager component. We switched the root folder and triggered the OnSend event for each dropdown selection by using RefreshFilesAsync method. In the OnSend event, we have passed the folder name to server as custom data. 
 
As mentioned in your update, we have followed the steps to switch between folders and search previous item. But we receive the correct path at server end. We have recorded the same in the below video for reference. 
 
 
Please find the sample from below link. 
 
 
Since we are unable to replicate the reported issue at our end, we request you to share the following details. 
 
1.      Confirm the package version used in your sample. 
2.      Whether OnSend event is triggered while changing the dropdown selection. 
3.      Share the video footage of issue. 
4.      If possible, replicate the issue in above sample. 
 
These details would help us to assist you promptly. Please let us know if you need any further assistance. 
 
Regards, 
Indhumathy L 



RO Rodrigo September 24, 2021 05:34 PM UTC

Error while dynamically changing root folder


1) Run provided sample (uploaded previously by Indhumathy Loganathan on sep/1/2021)

https://www.syncfusion.com/downloads/support/forum/165295/ze/FileManager-333267079

2) After load, change to any child folder (of Client1)

3) On Dropdown, switch from Client1 to Client2

4) Application enters infinite Loop

(Attached screenshot)

error.jpg



IL Indhumathy Loganathan Syncfusion Team September 27, 2021 12:34 PM UTC

Hi Rodrigo, 
 
Sorry for the inconvenience. 
 
We have validated your reported query in the shared sample and able to replicate the reported issue. We need some additional time to validate on this and provide an alternate solution to resolve the reported issue. We will update you further details on 30th September, 2021. 
 
We appreciate your patience. 
 
Regards, 
Indhumathy L 



IL Indhumathy Loganathan Syncfusion Team September 30, 2021 02:00 PM UTC

Hi Rodrigo, 
 
Sorry for the inconvenience. 
 
Currently we are facing some complexities in identifying the exact cause of the issue. We need some additional time to validate on this and we will update you further details on or before 5th October, 2021. 
 
We appreciate your patience. 
 
Regards, 
Indhumathy L 



IL Indhumathy Loganathan Syncfusion Team October 5, 2021 03:40 PM UTC

Hi Rodrigo, 
 
Thanks for your patience. 
 
We have validated your reported query. The reported issue can be resolved by reloading the File Manager component for each dropdown selection. But as of now we don’t have direct support to reload the File Manager component. So we have considered this support as a feature and this will be included in any of our upcoming releases. Generally, we will plan any feature implementation based on customer request count, feature rank and wishlist plan.   
 
You can track the feature status through the below link, 
 
 
However, if you are using client side Blazor sample you can try to achieve the requirement in the below way. 
 
 
In the above sample, we have achieved the requirement by force loading the entire page and stored the component details in a SQL table.  
 
Please let us know if you need any further assistance. 
 
Regards, 
Indhumathy L 



Loader.
Up arrow icon