import { MmUIComponent } from './component' export interface fileStatus { file: File progress: number status: 'padding' | 'uploading' | 'error' | 'success' | 'exceed' xhr: XMLHttpRequest } /** Upload component */ export declare class MmUpload extends MmUIComponent { /** The destination upload service address for receiving the file */ url: string /** Request parameter name */ name: string /** Additional data at upload time */ extraData: { [key: string]: any } /** Accept the uploaded file type */ accept: string /** Multiple file uploads are supported */ multiple: boolean /** Whether to disable */ disabled: boolean /** Whether drag and drop upload is enabled */ drag: boolean /** Whether the local file is automatically uploaded after getting it */ auto: boolean /** Upload list type */ listType: 'picture' | 'pictureCard' | 'text' /** Set the upload request header */ headers: { [key: string]: any } /** Whether the request authentication information is carried when the request is uploaded */ withCredentials: boolean /** Maximum number of files allowed to be uploaded */ limit: number /** Maximum single file size allowed for upload, in 5 MB file size in bytes */ maxSize: string /** Change callback */ onChange(newFiles: File[], currentFiles: File[]): void /** Before the file is uploaded to the server */ beforeUpload(file: File, allFiles: File[]): boolean | Promise /** Callback when upload progress changes during file upload */ onProgress(fileStatus: fileStatus): void /** Callback when successful file upload */ onSuccess(fileStatus: fileStatus): void /** Callback when file upload fails */ onError(fileStatus: fileStatus): void /** The maximum number of uploads allowed is called back */ onExceed(currentLen: number, limit: number): void /** Upload file than allowed maximum upload file size of the callback */ onOverSize(overSizeFiles: File[], files: File[]): void /** A custom preview can be used when clicking on a file in the file list */ onPreview(currentFile: File, files: File[]): void /** A callback when a file is removed from the list */ onRemove(deletedFile: File, afterDeletedFiles: File[]): void /** Override Ajax upload functionality provided within the component and customize the upload logic */ customRequest(): XMLHttpRequest }