@cloudbase/manager-node 5.5.3-beta.0 → 5.5.4
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.
- package/lib/storage/index.js +2 -2
- package/package.json +1 -1
- package/types/storage/type.d.ts +1 -1
package/lib/storage/index.js
CHANGED
|
@@ -1335,8 +1335,8 @@ class StorageService {
|
|
|
1335
1335
|
typeof cacheControl === 'number' ? `max-age=${cacheControl}` : String(cacheControl);
|
|
1336
1336
|
}
|
|
1337
1337
|
if (metadata) {
|
|
1338
|
-
//
|
|
1339
|
-
headers['
|
|
1338
|
+
// x-metadata 放在 Header 里,具体大小限制由服务端/网关决定
|
|
1339
|
+
headers['x-metadata'] = Buffer.from(JSON.stringify(metadata), 'utf8').toString('base64');
|
|
1340
1340
|
}
|
|
1341
1341
|
if (upsert) {
|
|
1342
1342
|
headers['x-upsert'] = 'true';
|
package/package.json
CHANGED
package/types/storage/type.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface IUploadObjectHttpOptions {
|
|
|
18
18
|
* 缓存控制;传 number 自动转换为 max-age=<value>,传 string 直接作为 Cache-Control 头值
|
|
19
19
|
*/
|
|
20
20
|
cacheControl?: number | string;
|
|
21
|
-
/** 自定义 metadata(JSON 对象),将以 Base64 编码后放入
|
|
21
|
+
/** 自定义 metadata(JSON 对象),将以 Base64 编码后放入 x-metadata 头 */
|
|
22
22
|
metadata?: Record<string, any>;
|
|
23
23
|
/** 爬虫指令(X-Robots-Tag 头) */
|
|
24
24
|
xRobotsTag?: string;
|