Skip to main content

FileSystemConfiguration.FileSystemProvider Property

Specifies a file system provider.

Namespace: DevExtreme.AspNet.Mvc.FileManagement

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public object FileSystemProvider { get; set; }

Property Value

Type Description
Object

A file system provider.

Remarks

The following example illustrates how to specify a file system provider.

DBFileProvider.cs

public class DbFileProvider : IFileProvider {
    const int DbRootItemId = -1;
    static readonly char[] PossibleDirectorySeparators = { '\\', '/' };
    ArtsDBContext DataContext { get; }
    public DbFileProvider(ArtsDBContext _context) {
        DataContext = _context;
    }
    public void Copy(string sourceKey, string destinationKey) {
        //...
    }

    public void CreateDirectory(string rootKey, string name) {
        // ...
    }
    // ...
}

API Controller:

public IActionResult FileSystem(FileSystemCommand command, string arguments) {
    var config = new FileSystemConfiguration {
        FileSystemProvider = new DbFileProvider(ArtsDBContext),
        //...
    }
}

Concepts

Online Demo

Online Example

See Also