32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { TencentYunZone } from '../../types/TencentYun';
|
||
export declare class TencentYunInstance {
|
||
private accessKey;
|
||
private secretKey;
|
||
private COS;
|
||
constructor(accessKey: string, secretKey: string);
|
||
getUploadInfo(bucket: string, zone: TencentYunZone, key?: string): {
|
||
key: string | undefined;
|
||
accessKey: string;
|
||
policy: string;
|
||
signature: string;
|
||
uploadHost: string;
|
||
bucket: string;
|
||
keyTime: string;
|
||
algorithm: string;
|
||
};
|
||
private getSignInfo;
|
||
removeFile(srcBucket: string, zone: TencentYunZone, srcKey: string): Promise<any>;
|
||
isExistObject(srcBucket: string, zone: TencentYunZone, srcKey: string): Promise<boolean>;
|
||
/**
|
||
* 获取预签名对象URL(统一接口)
|
||
* 生成腾讯云对象的预签名访问URL
|
||
*/
|
||
presignObjectUrl(method: 'GET' | 'PUT' | 'POST' | 'DELETE', bucket: string, zone: TencentYunZone, key: string, options?: {
|
||
expires?: number;
|
||
}): Promise<{
|
||
url: string;
|
||
headers?: Record<string, string | string[]>;
|
||
formdata?: Record<string, any>;
|
||
}>;
|
||
}
|