With the File Manager component, I am able to upload single file. I would like to upload zip files and then uncompress the zip file on the server side so that whole folder can be uploaded to the server. How can I accomplish that in the File Manager component controller?
Greetings from Syncfusion support.
In the File Manager component, you are able to upload a zip folder. But we were not clear about your exact requirement for extracting them at the server end. Whether you are using a Physical File Provider and want to extract the zip folder in your Windows Explorer Or do you want to do this folder extraction programmatically at the server end? Confirm your File Service provider to assist you promptly.
Also, we would like to let you know that we have already considered a directory (folder) upload feature in the Blazor File Manager component. Usually, Syncfusion will plan and implement the features based on feature rank, customer requested count, and volume wish-list. This will be included in any of our upcoming releases.
The status of this feature can be tracked through our feedback portal below.
You can get back to us if you need any further assistance.
Yes we would like to extract the zip file at the server end programmatically.
Can someone please look into this and recommend a solution?
Amjad, We have achieved your requirement by customizing our Physical File Service provider's "Upload" operation. In the sample, we have used the ZipFile.ExtractToDirectory method to extract the zip file to the specified directory. Check out the below code snippet.
public virtual FileManagerResponse Upload(string
FileManagerResponse uploadResponse = new FileManagerResponse();
foreach (IFormFile file in uploadFiles)
if (uploadFiles != null)
var name = System.IO.Path.GetFileName(file.FileName);
var fullName = Path.Combine((this.contentRootPath + path), name);
string fileName = folders[folders.Length - 1];
var fullName = Path.Combine((this.contentRootPath + path), fileName);
fullName = fullName.Replace("../", "");
if ((file.FileName).Split('.') == "zip")
string zipPath = fullName;
string extractPath = this.contentRootPath + path;
//Extract the zip folder.
//Here, we deleted the zip file which is uploaded.
The zipPath variable is the path of the zip file that you want to extract and extractPath is the path of the directory where you want to extract the contents of the zip file.
Check out the attached sample and get back to us if you need any further assistance.