@syncfusion/ej2-filemanager
Version:
Essential JS 2 FileManager Component
76 lines (68 loc) • 2.64 kB
text/typescript
import { Property, ChildProperty } from '@syncfusion/ej2-base';
/**
* Specifies the Ajax settings of the File Manager.
*/
export class UploadSettings extends ChildProperty<UploadSettings> {
/**
* Specifies the extensions of the file types allowed in the file manager component and pass the extensions with comma separators.
* For example, if you want to upload specific image files, pass allowedExtensions as ".jpg,.png".
*
* @defaults ''
*/
('')
public allowedExtensions: string;
/**
* By default, the FileManager component initiates automatic upload when the files are added in upload queue.
* If you want to manipulate the files before uploading to server, disable the autoUpload property.
* The buttons "upload" and "clear" will be hided from file list when the autoUpload property is true.
*
* @default true
*/
(true)
public autoUpload: boolean;
/**
* Defines whether to close the upload dialog after uploading all the files.
*
* @default false
*/
(false)
public autoClose: boolean;
/**
* Specifies a Boolean value that indicates whether the folder (directory) can be browsed and uploaded in the FileManager component.
* This property allows to select or drop to upload the folders (directories) instead of files. When folder upload is enabled, all the folder contents including hierarchy folders and files are considered to upload.
* Folder (directory) upload is supported for the following file system providers,
* - Physical provider
* - NodeJS provider
* - Azure provider
* - Amazon S3 provider
*
* @default false
*/
(false)
public directoryUpload: boolean;
/**
* Specifies the minimum file size to be uploaded in bytes.
* The property is used to make sure that you cannot upload empty files and small files.
*
* @default 0
*/
(0)
public minFileSize: number;
/**
* Specifies the maximum allowed file size to be uploaded in bytes.
* The property is used to make sure that you cannot upload too large files.
*
* @default 30000000
*/
(30000000)
public maxFileSize: number;
/**
* Specifies the chunk size to split the large file into chunks, and upload it to the server in a sequential order.
* If the chunk size property has value, the FileManager enables the chunk upload by default.
* It must be specified in bytes value.
*
* @default 0
*/
(0)
public chunkSize: number;
}