Angular 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.
- <dx-file-manager id="fileManager"
- [fileSystemProvider]="remoteFileProvider">
- <!-- ... -->
- </dx-file-manager>
- import { Component } from '@angular/core';
- import RemoteFileSystemProvider from 'devextreme/file_management/remote_provider';
- @Component({
- selector: 'app-root',
- templateUrl: 'app/app.component.html',
- styleUrls: ['app/app.component.css']
- })
- export class AppComponent {
- remoteFileProvider: RemoteFileSystemProvider;
- constructor(http: HttpClient) {
- this.remoteFileProvider = new RemoteFileSystemProvider({
- endpointUrl: "https://js.devexpress.com/Demos/Mvc/api/file-manager-file-system-scripts",
- beforeAjaxSend: function({ headers, formData, xhrFields }) {
- headers.RequestVerificationToken = document.getElementsByName("__RequestVerificationToken")[0].value;
- formData.dataValue = "some data";
- xhrFields.withCredentials = true;
- }
- });
- }
- }
- import { BrowserModule } from '@angular/platform-browser';
- import { NgModule} from '@angular/core';
- import { AppComponent } from './app.component';
- import { DxFileManagerModule } from 'devextreme-angular';
- @NgModule({
- imports: [
- BrowserModule,
- DxFileManagerModule
- ],
- declarations: [AppComponent],
- bootstrap: [AppComponent]
- })
- export class AppModule { }
beforeSubmit
Specifies a function that customizes a form submit request before it is sent to the server.
- <dx-file-manager id="fileManager"
- [fileSystemProvider]="remoteFileProvider">
- <!-- ... -->
- </dx-file-manager>
- import { Component } from '@angular/core';
- import RemoteFileSystemProvider from 'devextreme/file_management/remote_provider';
- @Component({
- selector: 'app-root',
- templateUrl: 'app/app.component.html',
- styleUrls: ['app/app.component.css']
- })
- export class AppComponent {
- remoteFileProvider: RemoteFileSystemProvider;
- constructor(http: HttpClient) {
- this.remoteFileProvider = new RemoteFileSystemProvider({
- endpointUrl: "https://js.devexpress.com/Demos/Mvc/api/file-manager-file-system-scripts",
- beforeSubmit: function({ formData }) {
- formData.value = document.getElementsByName("__RequestVerificationToken")[0].value;
- }
- });
- }
- }
- import { BrowserModule } from '@angular/platform-browser';
- import { NgModule} from '@angular/core';
- import { AppComponent } from './app.component';
- import { DxFileManagerModule } from 'devextreme-angular';
- @NgModule({
- imports: [
- BrowserModule,
- DxFileManagerModule
- ],
- declarations: [AppComponent],
- bootstrap: [AppComponent]
- })
- export class AppModule { }
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.
- <dx-file-manager id="fileManager"
- [fileSystemProvider]="remoteFileProvider">
- <!-- ... -->
- </dx-file-manager>
- import { Component } from '@angular/core';
- import RemoteFileSystemProvider from 'devextreme/file_management/remote_provider';
- @Component({
- selector: 'app-root',
- templateUrl: 'app/app.component.html',
- styleUrls: ['app/app.component.css']
- })
- export class AppComponent {
- remoteFileProvider: RemoteFileSystemProvider;
- constructor(http: HttpClient) {
- this.remoteFileProvider = new RemoteFileSystemProvider({
- endpointUrl: "https://js.devexpress.com/Demos/Mvc/api/file-manager-file-system-scripts",
- requestHeaders: {
- YourHeaderName: "YourHeaderValue"
- }
- });
- }
- }
- import { BrowserModule } from '@angular/platform-browser';
- import { NgModule} from '@angular/core';
- import { AppComponent } from './app.component';
- import { DxFileManagerModule } from 'devextreme-angular';
- @NgModule({
- imports: [
- BrowserModule,
- DxFileManagerModule
- ],
- declarations: [AppComponent],
- bootstrap: [AppComponent]
- })
- export class AppModule { }
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