Your search did not match any results.
File Manager

Overview

Documentation

The DevExtreme HTML5 JavaScript FileManager widget allows you to display and manage files and directories for different file systems. The FileManager widget uses file system providers to access file systems. Use the fileSystemProvider option to configure the widget's file system provider. The "File System Types" demo group illustrates how to use the FileManager widget with different file system providers.

The widget's default security settings provide read-only access to files and directories. Use the permissions option to deny or allow a user to copy, create, move, delete, rename, upload, and download files and directories. You can also specify file restrictions: allowed file extensions (allowedFileExtensions), chunk size (chunkSize) and maximum file size (maxFileSize).

Use the widget's itemView option or the view switcher on the toolbar to display file system items as a detailed list or customizable thumbnails.

This demo contains commented out code lines that enable file modification operations. You can uncomment them and configure if necessary.

Copy to CodePen
Apply
Reset
$(function () { var provider = new DevExpress.fileManagement.RemoteFileSystemProvider({ endpointUrl: "https://js.devexpress.com/Demos/Mvc/api/file-manager-file-system-images" }); $("#file-manager").dxFileManager({ name: "fileManager", fileSystemProvider: provider, currentPath: "Widescreen", permissions: { create: true, copy: true, move: true, delete: true, rename: true, upload: true, download: true }, onSelectedFileOpened: function(e) { var popup = $("#photo-popup").dxPopup("instance"); popup.option({ "title": e.fileItem.name, "contentTemplate": "<img src=\"" + e.fileItem.dataItem.url + "\" class=\"photo-popup-image\" />" }); popup.show(); } }); $("#photo-popup").dxPopup({ maxHeight: 600, closeOnOutsideClick: true, onContentReady: function(e) { var $contentElement = e.component.content(); $contentElement.addClass("photo-popup-content"); } }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.1.5/css/dx.common.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.1.5/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/20.1.5/js/dx.all.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="data.js"></script> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="file-manager"></div> <div id="photo-popup"></div> </div> </body> </html>
.photo-popup-content { text-align: center; } .photo-popup-content .photo-popup-image { height: 100%; max-width: 100%; }