Cell - COS Component
ObjectStorageService of @celljs/cloud on Tencent Cloud COS, with the cos-nodejs-sdk-v5 SDK.
bash
npm install @celljs/cosyaml
cloud:
region: ap-guangzhou
credentials:
accessKeyId: "${env.TENCENTCLOUD_SECRET_ID}"
accessKeySecret: "${env.TENCENTCLOUD_SECRET_KEY}"ts
@Autowired(ObjectStorageService)
protected readonly storage: ObjectStorageService<any>;
await this.storage.putObject({ bucket: 'my-bucket-1250000000', key: 'a.txt', body: 'hello' });COS bucket names include the APPID. cloud.client passes extra options to the COS client. See @celljs/cloud for the interface and the credential sources.