DefaultFileProvider Class
Provides access to files and folders.
Namespace: DevExtreme.AspNet.Mvc.FileManagement
Assembly: DevExtreme.AspNet.Core.dll
Declaration
public class DefaultFileProvider :
IFileProvider
File providers are components that provide APIs used to access and modify files and folders.
View:
$("#file-manager").dxFileManager({
name: "fileManager",
fileProvider: new DevExpress.FileProviders.WebApi({
endpointUrl: '@Url.RouteUrl("Default", new { controller = "api/FileManagerApi" })'
}),
height: 450
//...
});
API Controller:
public IActionResult FileSystem(FileSystemCommand command, string arguments) {
var config = new FileSystemConfiguration {
Request = Request,
FileSystemProvider = new DefaultFileProvider(_hostingEnvironment.ContentRootPath + "/wwwroot")
};
//...
}
Online demo: File Manager - Binding to File System
See Also