Using File Manager by code

Hy All,

Is it possible to use FileManager only by code behind razor page without display a region?

For example I have tried with this code:

                FileManager = new SfFileManager();
                FileManager.AjaxSettings = new FileManagerAjaxSettings();
                FileManager.AjaxSettings.Url = "/api/FileManager/FileOperations";
                FileManager.AjaxSettings.DownloadUrl = "/api/FileManager/Download";
                FileManager.SelectedItems = new string[] { fileName };
                FileManager.DownloadFiles(fileName);

but the methods of the controller listen at above Url are not called. 

thanks a lot,
Rolando Tonin

1 Reply 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team September 4, 2020 11:19 AM UTC

Hi Rolando Tonin,  
 
Greetings from Syncfusion support. 
 
We have checked your requirement with FileManagar component. We have to use tag directive to render the FileManager as Blazor component. When you create class instance to render FileManager, then it will not act like a Blazor component. So, your requirement currently achievable in Blazor platform. 
 
Refer to the below links to know more about the FileManager component. 
 
 
 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 


Marked as answer
Loader.
Up arrow icon