interface UploadProps {
    accept?: string;
    action?: string | ((file: RcFile) => string) | ((file: RcFile) => PromiseLike<string>);
    beforeUpload?: ((file: RcFile, FileList: RcFile[]) => boolean | PromiseLike<void>);
    className?: string;
    customRequest?: ((options: UploadCustomRequestOptions) => void);
    data?: object | ((file: UploadFile) => object);
    defaultFileList?: UploadFile[];
    directory?: boolean;
    disabled?: boolean;
    fileList?: UploadFile[];
    headers?: {
        [key: string]: string;
    };
    iconRender?: ((file: UploadFile, listType?: "text" | "picture" | "picture-card") => ReactNode);
    id?: string;
    isImageUrl?: ((file: UploadFile) => boolean);
    listType?: "text" | "picture" | "picture-card";
    locale?: {
        downloadFile?: string;
        previewFile?: string;
        removeFile?: string;
        uploadError?: string;
        uploading?: string;
    };
    method?:
        | "POST"
        | "PUT"
        | "PATCH"
        | "post"
        | "put"
        | "patch";
    multiple?: boolean;
    name?: string;
    onChange?: ((info: {
        event?: {
            percent: number;
        };
        file: UploadFile;
        fileList: UploadFile[];
    }) => void);
    onDownload?: ((file: UploadFile) => void);
    onPreview?: ((file: UploadFile) => void);
    onRemove?: ((file: UploadFile) => boolean | void | Promise<boolean | void>);
    openFileDialogOnClick?: boolean;
    prefixCls?: string;
    previewFile?: ((file: File | Blob) => PromiseLike<string>);
    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;
    };
    showUploadList?: boolean | {
        downloadIcon?: ReactNode;
        removeIcon?: ReactNode;
        showDownloadIcon?: boolean;
        showPreviewIcon?: boolean;
        showRemoveIcon?: boolean;
    };
    style?: CSSProperties;
    supportServerRender?: boolean;
    transformFile?: ((file: RcFile) =>
        | string
        | File
        | Blob
        | PromiseLike<string | File | Blob>);
    type?: "drag" | "select";
    withCredentials?: boolean;
}

Properties

accept?: string
action?: string | ((file: RcFile) => string) | ((file: RcFile) => PromiseLike<string>)
beforeUpload?: ((file: RcFile, FileList: RcFile[]) => boolean | PromiseLike<void>)
className?: string
customRequest?: ((options: UploadCustomRequestOptions) => void)
data?: object | ((file: UploadFile) => object)
defaultFileList?: UploadFile[]
directory?: boolean
disabled?: boolean
fileList?: UploadFile[]
headers?: {
    [key: string]: string;
}
iconRender?: ((file: UploadFile, listType?: "text" | "picture" | "picture-card") => ReactNode)
id?: string
isImageUrl?: ((file: UploadFile) => boolean)
listType?: "text" | "picture" | "picture-card"
locale?: {
    downloadFile?: string;
    previewFile?: string;
    removeFile?: string;
    uploadError?: string;
    uploading?: string;
}
method?:
    | "POST"
    | "PUT"
    | "PATCH"
    | "post"
    | "put"
    | "patch"
multiple?: boolean
name?: string
onChange?: ((info: {
    event?: {
        percent: number;
    };
    file: UploadFile;
    fileList: UploadFile[];
}) => void)
onDownload?: ((file: UploadFile) => void)
onPreview?: ((file: UploadFile) => void)
onRemove?: ((file: UploadFile) => boolean | void | Promise<boolean | void>)
openFileDialogOnClick?: boolean
prefixCls?: string
previewFile?: ((file: File | Blob) => PromiseLike<string>)
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

  • OptionalclassName?: string
  • Optionalformat?: ((percent?: number, successPercent?: number) => ReactNode)
      • (percent?, successPercent?): ReactNode
      • Parameters

        • Optionalpercent: number
        • OptionalsuccessPercent: number

        Returns ReactNode

  • OptionalgapDegree?: number
  • OptionalgapPosition?:
        | "top"
        | "bottom"
        | "left"
        | "right"
  • OptionalprefixCls?: string
  • OptionalshowInfo?: boolean
  • Optionalsize?: "default" | "small"
  • Optionalstatus?:
        | "normal"
        | "exception"
        | "active"
        | "success"
  • Optionalsteps?: number
  • OptionalstrokeColor?: string | ({ direction?: string | undefined; } & ({ [percentage: string]: string; } | { from: string; to: string; }))
  • OptionalstrokeLinecap?: "butt" | "round" | "square"
  • OptionalstrokeWidth?: number
  • Optionalstyle?: CSSProperties
  • Optionalsuccess?: {
        percent?: number;
        progress?: number;
        strokeColor?: string;
    }
    • Optionalpercent?: number
    • Optionalprogress?: number

      Следует использовать свойство percent

      @universe-platform/uikit 2.0.0

    • OptionalstrokeColor?: string
  • OptionalsuccessPercent?: number

    Следует использовать свойство success

    @universe-platform/uikit 2.0.0

  • OptionaltrailColor?: string
  • Optionalwidth?: number
showUploadList?: boolean | {
    downloadIcon?: ReactNode;
    removeIcon?: ReactNode;
    showDownloadIcon?: boolean;
    showPreviewIcon?: boolean;
    showRemoveIcon?: boolean;
}
supportServerRender?: boolean
transformFile?: ((file: RcFile) =>
    | string
    | File
    | Blob
    | PromiseLike<string | File | Blob>)
type?: "drag" | "select"
withCredentials?: boolean