JavaScript/jQuery FileManager - Custom.Configuration
abortFileUpload
A Promise that is resolved after the file upload in aborted. It is a native Promise or a jQuery.Promise when you use jQuery.
copyItem
A Promise that is resolved after the file system item is copied. It is a native Promise or a jQuery.Promise when you use jQuery.
createDirectory
A Promise that is resolved after a new directory is created. It is a native Promise or a jQuery.Promise when you use jQuery.
deleteItem
A Promise that is resolved after a file system item is deleted. It is a native Promise or a jQuery.Promise when you use jQuery.
getItems
A Promise that is resolved after file system items are obtained. It is a native Promise or a jQuery.Promise when you use jQuery.
getItemsContent
A Promise that is resolved after the content of the file system items is obtained. It is a native Promise or a jQuery.Promise when you use jQuery.
hasSubDirectoriesExpr
A function or the name of a data source field that provides information on whether a file or directory contains sub directories.
moveItem
A Promise that is resolved after the file system item is moved. It is a native Promise or a jQuery.Promise when you use jQuery.
renameItem
A Promise that is resolved after the file system item is renamed. It is a native Promise or a jQuery.Promise when you use jQuery.
thumbnailExpr
The data field can contain one of the following:
- The icon's URL
- The icon's name if the icon is from the DevExtreme icon library
- The icon's CSS class if the icon is from an external icon library (see External Icon Libraries)
- The icon in the Base64 format
uploadFileChunk
A Promise that is resolved after the file system item is uploaded. It is a native Promise or a jQuery.Promise when you use jQuery.
- $(function () {
- $("#file-manager").dxFileManager({
- fileSystemProvider: provider,
- });
- });
- const endpointUrl = 'https://js.devexpress.com/Demos/Mvc/api/file-manager-azure-access';
- gateway = new AzureGateway(endpointUrl, onRequestExecuted);
- azure = new AzureFileSystem(gateway);
- const provider = new DevExpress.fileManagement.CustomFileSystemProvider({
- uploadFileChunk,
- //...
- });
- function uploadFileChunk(fileData, uploadInfo, destinationDirectory) {
- let deferred = null;
-
- if (uploadInfo.chunkIndex === 0) {
- const filePath = destinationDirectory.path ? `${destinationDirectory.path}/${fileData.name}` : fileData.name;
- deferred = gateway.getUploadAccessUrl(filePath).done((accessUrl) => {
- uploadInfo.customData.accessUrl = accessUrl;
- });
- } else {
- deferred = $.Deferred().resolve().promise();
- }
-
- deferred = deferred.then(() => gateway.putBlock(
- uploadInfo.customData.accessUrl,
- uploadInfo.chunkIndex,
- uploadInfo.chunkBlob,
- ));
-
- if (uploadInfo.chunkIndex === uploadInfo.chunkCount - 1) {
- deferred = deferred.then(() => gateway.putBlockList(
- uploadInfo.customData.accessUrl,
- uploadInfo.chunkCount,
- ));
- }
-
- return deferred.promise();
- }
If you have technical questions, please create a support ticket in the DevExpress Support Center.