oak-general-business/lib/utils/cos/common.d.ts

21 lines
784 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { OpSchema } from '../../oak-app-domain/ExtraFile/Schema';
import { PresignMultiPartUploadFn, UploadFn } from "../../types/Cos";
import { EntityDict } from '../../oak-app-domain';
export declare function isAbortError(error: any): boolean;
/**
* 分片上传通用方法适用于所有类S3存储服务如AWSMinIO、阿里云OSS等
* @param options 参数
* @return
*/
export declare function chunkUpload(options: {
extraFile: OpSchema;
presignMultiPartUpload: PresignMultiPartUploadFn;
uploadFn: UploadFn;
file: string | File;
getPercent?: Function;
parallelism?: number;
retryTimes?: number;
retryDelay?: number;
onChunkSuccess?: (chunkInfo: EntityDict['extraFile']['Schema']['chunkInfo']) => Promise<void>;
}): Promise<void>;