Your search did not match any results.

Binding to File System

Documentation

The FileManager widget can display and manage content of a folder that is located on the server. You can specify the remote folder as follows: path to the folder in a web application, path to the network folder, relative path to the folder, absolute path to the folder on a local disc.

<script type="text/javascript"> $(function () { $("#file-manager").dxFileManager({ name: "fileManager", fileProvider: new DevExpress.FileProviders.WebApi({ endpointUrl: '@Url.RouteUrl("Default", new { controller = "api/FileManagerApi" })' }), height: 450 // uncomment the code below to enable file/folder management /* permissions: { create: true, copy: true, move: true, remove: true, rename: true, upload: true } */ }); }); </script> <div id="file-manager"></div>
using Microsoft.AspNetCore.Mvc; namespace DevExtreme.NETCore.Demos.Controllers { public class FileManagerController : Controller { public IActionResult BindingToFileSystem() { return View(); } } }
using DevExtreme.AspNet.Mvc.FileManagement; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; namespace DevExtreme.NETCore.Demos.Controllers { [Route("api/[controller]")] public class FileManagerApiController : Controller { IHostingEnvironment _hostingEnvironment; public FileManagerApiController(IHostingEnvironment hostingEnvironment) { _hostingEnvironment = hostingEnvironment; } public IActionResult FileSystem(FileSystemCommand command, string arguments) { var config = new FileSystemConfiguration { Request = Request, FileSystemProvider = new DefaultFileProvider(_hostingEnvironment.ContentRootPath + "/wwwroot") //uncomment the code below to enable file/folder management //AllowCopy = true, //AllowCreate = true, //AllowMove = true, //AllowRemove = true, //AllowRename = true, //AllowUpload = true }; var processor = new FileSystemCommandProcessor(config); var result = processor.Execute(command, arguments); return Ok(result.GetClientCommandResult()); } } }