article-writer-cn
Version:
AI 驱动的智能写作系统 - 专注公众号/自媒体文章创作
34 lines • 989 B
TypeScript
/**
* 腾讯云 COS 图床提供者
*
* 参考文档: https://cloud.tencent.com/document/product/436/8629
*/
import type { ImageBedProvider, ImageBedType, UploadResult, TencentCOSConfig } from '../types.js';
export declare class TencentCOSProvider implements ImageBedProvider {
readonly type: ImageBedType;
private config;
private cosClient;
constructor(config: TencentCOSConfig);
/**
* 上传单张图片到腾讯云 COS
*/
upload(imagePath: string, remotePath?: string): Promise<UploadResult>;
/**
* 批量上传图片
*/
uploadBatch(imagePaths: string[]): Promise<UploadResult[]>;
/**
* 验证配置是否有效
*/
validateConfig(): Promise<boolean>;
/**
* 生成远程文件路径
* 格式: images/{year}/{month}/{hash}-{filename}
*/
private generateRemotePath;
/**
* 构建公开访问 URL
*/
private buildPublicUrl;
}
//# sourceMappingURL=tencent-cos-provider.d.ts.map