JavaScript/jQuery FileManager - Remote.Configuration
This section describes properties that configure the Remote file system provider.
beforeAjaxSend
Specifies a function that customizes an Ajax request before it is sent to the server.
The request parameters.
| Name | Type | Description |
|---|---|---|
| formData | Custom data (key/value pairs) that is sent to the server with the request. | |
| headers | The request headers. | |
| xhrFields | An object (fieldName/fieldValue pairs) to set on the native XMLHttpRequest object. |
Custom data (key/value pairs) that is sent to the server with the request.
The request headers.
An object (fieldName/fieldValue pairs) to set on the native XMLHttpRequest object.
- $(function() {
- $("#fileManagerContainer").dxFileManager({
- fileSystemProvider: new DevExpress.fileManagement.RemoteFileSystemProvider({
- // ...
- beforeAjaxSend: function({ headers, formData, xhrFields }) {
- headers.RequestVerificationToken = document.getElementsByName("__RequestVerificationToken")[0].value;
- formData.dataValue = "some data";
- xhrFields.withCredentials = true;
- }
- })
- });
- });
beforeSubmit
Specifies a function that customizes a form submit request before it is sent to the server.
- $(function() {
- $("#fileManagerContainer").dxFileManager({
- fileSystemProvider: new DevExpress.fileManagement.RemoteFileSystemProvider({
- // ...
- beforeSubmit: function({ formData }) {
- formData.value = document.getElementsByName("__RequestVerificationToken")[0].value;
- }
- })
- });
- });
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.
requestHeaders
Specifies the request headers.
- $(function() {
- $("#fileManagerContainer").dxFileManager({
- fileSystemProvider: new DevExpress.fileManagement.RemoteFileSystemProvider({
- endpointUrl: "https://js.devexpress.com/Demos/Mvc/api/file-manager-file-system-scripts",
- requestHeaders: {
- YourHeaderName: "YourHeaderValue"
- },
- // ...
- })
- });
- });
thumbnailExpr
Specifies which data field provides icons to be used as thumbnails.
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