object-storage-js
Version:
js直传server、minio、obs、oss、s3系列
40 lines (39 loc) • 942 B
TypeScript
export interface ProgressCallback {
loaded: number;
total: number;
}
export interface uploadParamsType {
file: File;
fileName?: '';
maxSize?: number;
partSize?: number;
queueLength?: number;
uploadUrl: string;
mergeUrl?: string;
onUploadProgress?: (params: ProgressCallback) => void;
onCancel?: (params: any) => void;
}
export interface uploadArgumentsType {
uploadType: string;
instance: any;
bucketName?: string;
params: uploadParamsType;
}
export declare enum ObjectStorageType {
NORMAL = "normal",
OSS = "oss",
OBS = "obs",
MINIO = "minio",
AWS = "aws"
}
export interface instanceParamsType {
type: ObjectStorageType;
accessKey?: string;
secretKey?: string;
securityToken?: string;
endPoint?: string;
region?: string;
bucketName?: string;
sdkOtherParams?: object;
sdkObject?: any;
}