Explanation
Upload the file including the folder structure.
On the server, you can obtain the folder path with the name 'DEXTUploadX5_Folder'.
# server side code
using (var dext = new DEXTUpload.NET.FileUpload())
{
var sb = new StringBuilder();
var files = dext.GetFileElements("DEXTUploadX5_FileData");
var folders = dext.GetStringElements("DEXTUploadX5_Folder");
var list = files.Zip(folders, (first, second) => new { File = first, Folder = second });
var dir = null as DirectoryInfo;
foreach (var pair in list)
{
dir = new DirectoryInfo(Path.Combine(dext.DefaultPath, pair.Folder.Value.Substring(1)));
if (!dir.Exists) dir.Create();
if (!pair.File.IsEmpty)
{
pair.File.Save(dir);
sb.AppendFormat("F:{0}\n", pair.File.LastSavedFilePath);
}
}
...
}
Precautions for uploading the folder structure are as follows.
Only DEXTUploadX5 version 3.6.0.0 or higher is supported.
Folder structure upload supports only desktop Chromium-based browsers (version 80 or higher), Firefox (version 50 or higher), and Safari (version 12 or higher).
Folders without files are excluded.
Example