@celljs/cos 4.6.1 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.zh-cn.md +24 -0
  2. package/package.json +3 -3
@@ -0,0 +1,24 @@
1
+ # Cell - COS 组件
2
+
3
+ [`@celljs/cloud`](../cloud) 的 `ObjectStorageService` 在 [腾讯云 COS](https://www.tencentcloud.com/products/cos) 上,使用 `cos-nodejs-sdk-v5` SDK。
4
+
5
+ ```bash
6
+ npm install @celljs/cos
7
+ ```
8
+
9
+ ```yaml
10
+ cloud:
11
+ region: ap-guangzhou
12
+ credentials:
13
+ accessKeyId: "${env.TENCENTCLOUD_SECRET_ID}"
14
+ accessKeySecret: "${env.TENCENTCLOUD_SECRET_KEY}"
15
+ ```
16
+
17
+ ```ts
18
+ @Autowired(ObjectStorageService)
19
+ protected readonly storage: ObjectStorageService<any>;
20
+
21
+ await this.storage.putObject({ bucket: 'my-bucket-1250000000', key: 'a.txt', body: 'hello' });
22
+ ```
23
+
24
+ COS 存储桶名包括 APPID。`cloud.client` 把额外的选项传给 COS 客户端。见 [@celljs/cloud](../cloud) 了解接口和凭据来源。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/cos",
3
- "version": "4.6.1",
3
+ "version": "4.8.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "cell-component"
@@ -31,8 +31,8 @@
31
31
  "watch": "tsc -b -w --preserveWatchOutput"
32
32
  },
33
33
  "dependencies": {
34
- "@celljs/cloud": "4.6.1",
35
- "@celljs/core": "4.6.1",
34
+ "@celljs/cloud": "4.8.0",
35
+ "@celljs/core": "4.8.0",
36
36
  "cos-nodejs-sdk-v5": "^2.8.3"
37
37
  },
38
38
  "publishConfig": {