Vue
A newer version of this page is available. Switch to the current version.

JavaScript/jQuery FileManager - upload

Configures upload settings.

Type:

Object

jQuery
$(function () {
    $("#file-manager").dxFileManager({
        upload: {
            chunkSize: 500000,
            maxFileSize: 1000000
        },
        // ...
    });
});
Angular
app.component.html
app.module.ts
<dx-file-manager id="fileManager">
    <dxo-upload [chunkSize]="500000" [maxFileSize]="1000000" ></dxo-upload>
    <!-- ... -->
</dx-file-manager>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { DxFileManagerModule } from 'devextreme-angular';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        DxFileManagerModule
    ],
    //...
})
export class AppModule { }    
Vue
App.vue
<template>
    <DxFileManager>   
        <DxUpload 
            :chunk-size="500000"
            :max-file-size="1000000"
            />
    </DxFileManager>
</template>
<script>
    import 'devextreme/dist/css/dx.light.css';    

    import {
        DxFileManager,
        DxUpload
    } from 'devextreme-vue/file-manager';

    export default {
        components: {
            DxFileManager,
            DxUpload
        },
        data() {
            return {
                //...
            };
        }            
    };
</script>
React
App.js
import React from 'react';

import 'devextreme/dist/css/dx.light.css';

import FileManager, { Upload } from 'devextreme-react/file-manager';

class App extends React.Component {
    render() {
        return (
            <FileManager>
                <Upload 
                    chunkSize={500000} 
                    maxFileSize={1000000}
                />
            </FileManager>
        );
    }
}
export default App;
ASP.NET MVC Controls
Razor C#
@(Html.DevExtreme().FileManager()
    .Upload(up => up
        .ChunkSize(500000)
        .MaxFileSize(1000000)
    )
    // ...
)
ASP.NET Core Controls
Razor C#
@(Html.DevExtreme().FileManager()
    .Upload(up => up
        .ChunkSize(500000)
        .MaxFileSize(1000000)
    )
    // ...
)

chunkSize

Specifies a chunk size, in bytes.

Type:

Number

Default Value: 200000

The FileManager can divide a large file in parts and upload them in separate requests.

maxFileSize

Specifies the maximum upload file size, in bytes.

Type:

Number

Default Value: 0