Your search did not match any results.
File Manager

Overview

The DevExtreme HTML5 JavaScript File Manager widget allows you to display and manage files and directories for different file systems. The File Manager uses file providers to access file systems. Use the fileProvider option to configure the widget's file provider. The "File System Types" demo group illustrates how to use the FileManager widget with different file 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, remove, rename, upload, and download files and directories. You can also specify upload file restrictions: allowed file extensions (allowedFileExtensions) 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 () { $("#file-manager").dxFileManager({ name: "fileManager", fileProvider: new DevExpress.fileProviders.Remote({ endpointUrl: "https://js.devexpress.com/Demos/Mvc/api/file-manager-file-system-images" }), currentPath: "Widescreen", permissions: { create: true, copy: true, move: true, remove: 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.4.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/19.2.4/css/dx.common.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/19.2.4/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/19.2.4/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%; }