Vue FileManager - Remote

The Remote file system provider works with a file system located on the server.

import RemoteFileSystemProvider from "devextreme/file_management/remote_provider"
Type:

Object

Set the endpointUrl property to specify the endpoint used to access and modify the file system.

The server should return data objects of the following structure:

{
    name: "MyFile.jpg",
    size: 1024,
    dateModified: "2019/05/08",
    thumbnail: "/thumbnails/images/jpeg.ico",
    isDirectory: true,
    hasSubDirectories: true
}

Fields in this structure have conventional names that you can change via [fieldName]Expr properties: nameExpr, sizeExpr, dateModifiedExpr, and so on.

The following code shows how to bind the FileManager to the Remote file system provider:

jQuery
index.js
$(function() {
    $("#fileManagerContainer").dxFileManager({
        fileSystemProvider: new DevExpress.fileManagement.RemoteFileSystemProvider({
            endpointUrl: "https://mydomain.com/api/files",
            thumbnailExpr: "icon",
            // ...
        })
    });
});

On the server-side, you need to process file management requests. DevExtreme provides helpers for ASP.NET MVC and ASP.NET Core that do this. To view the server-side code, navigate to the FileManagerApiController.cs tab in the following demo:

View Demo

Configuration

This section describes properties that configure the Remote file system provider.

Name Description
dateModifiedExpr

Specifies which data field provides timestamps that indicate when a file was last modified.

endpointUrl

Specifies the URL of an endpoint used to access and modify a file system located on the server.

hasSubDirectoriesExpr

Specifies which data field provides information about whether a directory has subdirectories.

isDirectoryExpr

Specifies which data field provides information about whether a file system item is a directory.

keyExpr

Specifies the data field that provides keys.

nameExpr

Specifies which data field provides file and directory names.

sizeExpr

Specifies which data field provides file sizes.

thumbnailExpr

Specifies which data field provides icons to be used as thumbnails.

Methods

This section describes members used to manage file system items.

Name Description
abortFileUpload()

Cancels the file upload.

copyItems()

Copies files or folders.

createDirectory()

Creates a directory.

deleteItems()

Deletes files or folders.

downloadItems()

Downloads files.

getItems()

Gets file system items.

getItemsContent()

Gets items content.

moveItems()

Moves files and folders.

renameItem()

Renames a file or folder.

uploadFileChunk()

Uploads a file in chunks.