Your search did not match any results.
File Manager

Binding to File System


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("DefaultApi", new { httproute = true, controller = "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 System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class FileManagerController : Controller { public ActionResult BindingToFileSystem() { return View(); } } }
using DevExtreme.AspNet.Mvc.FileManagement; using System.Net.Http; using System.Web; using System.Web.Http; namespace DevExtreme.MVC.Demos.Controllers.ApiControllers { public class FileManagerApiController : ApiController { HttpContext CurrentContext = HttpContext.Current; [HttpGet] public HttpResponseMessage FileSystem(FileSystemCommand command, string arguments) { var config = new FileSystemConfiguration { Request = new HttpContextWrapper(CurrentContext).Request, FileSystemProvider = new DefaultFileProvider(CurrentContext.Server.MapPath("~/Scripts")) }; var processor = new FileSystemCommandProcessor(config); var result = processor.Execute(command, arguments); return Request.CreateResponse(result.GetClientCommandResult()); } } }