oak-external-sdk/es/service/tencent/Tencent.d.ts

32 lines
1.1 KiB
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 { 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>;
}>;
}