Properties
Optional
accept
accept?: string
Optional
action
action?: string | ((file: RcFile) => string) | ((file: RcFile) => PromiseLike<string>) Optional
beforeUpload
beforeUpload?: ((file: RcFile,
FileList: RcFile[]) => boolean | PromiseLike<void>) Optional
className
className?: string
Optional
customRequest
Optional
data
Optional
defaultFileList
Optional
directory
directory?: boolean
Optional
disabled
disabled?: boolean
Optional
fileList
Optional
headers
headers?: {
[key: string]: string;
}
Optional
iconRender
Optional
id
id?: string
Optional
isImageUrl
Optional
listType
listType?: "text" | "picture" | "picture-card"
Optional
locale
locale?: {
downloadFile?: string;
previewFile?: string;
removeFile?: string;
uploadError?: string;
uploading?: string;
}
Optional
method
method?:
| "POST"
| "PUT"
| "PATCH"
| "post"
| "put"
| "patch"
Optional
multiple
multiple?: boolean
Optional
name
name?: string
Optional
onChange
onChange?: ((info: { event?: { percent: number; }; file: UploadFile; fileList: UploadFile[]; }) => void) Optional
onDownload
Optional
onPreview
Optional
onRemove
onRemove?: ((file: UploadFile) => boolean | void | Promise<boolean | void>) Optional
openFileDialogOnClick
openFileDialogOnClick?: boolean
Optional
prefixCls
prefixCls?: string
Optional
previewFile
previewFile?: ((file: File | Blob) => PromiseLike<string>)
Optional
progress
progress?: { className?: string; format?: ((percent?: number,
successPercent?: number) => ReactNode); gapDegree?: number; gapPosition?: | "top" | "bottom" | "left" | "right"; prefixCls?: string; showInfo?: boolean; size?: "default" | "small"; status?: | "normal" | "exception" | "active" | "success"; steps?: number; strokeColor?: string | ({ direction?: string | undefined; } & ({ [percentage: string]: string; } | { from: string; to: string; })
); strokeLinecap?: "butt" | "round" | "square"; strokeWidth?: number; style?: CSSProperties; success?: { percent?: number; progress?: number; strokeColor?: string; }; successPercent?: number; trailColor?: string; width?: number; } Type declaration
Optional
className?: string
Optional
format?: ((percent?: number, successPercent?: number) => ReactNode)
- (percent?, successPercent?): ReactNode
Parameters
Optional
percent: numberOptional
successPercent: number
Optional
gapDegree?: number
Optional
gapPosition?:
| "top"
| "bottom"
| "left"
| "right"
Optional
prefixCls?: string
Optional
showInfo?: boolean
Optional
size?: "default" | "small"
Optional
status?:
| "normal"
| "exception"
| "active"
| "success"
Optional
steps?: number
Optional
strokeColor?: string | ({ direction?: string | undefined; } & ({ [percentage: string]: string; } | { from: string; to: string; }))
Optional
strokeLinecap?: "butt" | "round" | "square"
Optional
strokeWidth?: number
Optional
success?: {
percent?: number;
progress?: number;
strokeColor?: string;
}
Optional
percent?: number
Optional
progress?: number
Optional
strokeColor?: string
Optional
successPercent?: number
Optional
trailColor?: string
Optional
width?: number
Optional
showUploadList
showUploadList?: boolean | { downloadIcon?: ReactNode; removeIcon?: ReactNode; showDownloadIcon?: boolean; showPreviewIcon?: boolean; showRemoveIcon?: boolean; } Optional
style
Optional
supportServerRender
supportServerRender?: boolean
Optional
transformFile
transformFile?: ((file: RcFile) => | string | File | Blob | PromiseLike<string | File | Blob>) Optional
type
type?: "drag" | "select"
Optional
withCredentials
withCredentials?: boolean
Public