Releases: baidubce/bce-sdk-js
Releases · baidubce/bce-sdk-js
1.0.3
published on 2025-04-07
What's Changed
- feat:BOS支持合规配置相关API by @xiangwaner in #120
- fix: force to generate a new endpoint based on region by @Dora-boots in #121
- feat: Allow passing headers in the ObjectLock related APIs by @Dora-boots in #122
- feat:initBucketObjectLock支持headers by @xiangwaner in #123
- chore: supporting for 'x-bce-tagging' header by @lurunze1226 in #125
- fix: removeVersionPrefix配置优先级问题 by @lurunze1226 in #127
- Update mime.types.js by @hero-guo in #126
- feat: 支持全局代理配置 by @lurunze1226 in #128
- fix: 设置全局endpoint后始终使用bj作为endpoint的问题 by @Dora-boots in #129
- feat: iphost默认pathStyle为true by @Dora-boots in #130
New Contributors
- @xiangwaner made their first contribution in #120
- @hero-guo made their first contribution in #126
Full Changelog: 1.0.2...1.0.3
1.0.1
published on 2024-07-16
BosClient
putSuperObject
API (encapsulation for mutipart upload)getBucketStorageclass
API- Support the
createSignature
method inBceConfig
for customizing the generation of authentication signatures (Authorization)." - support virtual host mode.
BceClient
- support
region
andcustomGenerateUrl
to change endpoint.
1.0.0-rc.42
published on 2023-10-26
- BosClient: support callback parameter in options;
Approach 1:
Use the callback parameter, the SDK will help you process the parameter and add it to the request header.
try {
const res = await client.putObjectFromString('bucketName', 'fileName', 'demo-string', {
callback: {
urls: ["https://www.test.com/callback"],
vars: {name: 'baidu'},
encrypt: 'config',
key: 'callback1'
}
});
/* callback result */
console.log(res.body.callback.result);
} catch (e) {
/* callback error code */
console.error(res.body.callback.code);
/* callback error message */
console.error(res.body.callback.message);
}
Approach 2:
Directly pass the "x-bce-process" parameter to headers.
try {
const res = await client.putObjectFromString('bucketName', 'fileName', 'demo-string', {
'x-bce-process': 'callback/callback,u_WyJodHRwczovL3d3dy50ZXN0LmNvbS9jYWxsYmFjayJd,m_sync,v_eyJuYW1lIjoiYmFpZHUifQ'
});
/* callback result */
console.log(res.body.callback.result);
} catch (e) {
/* callback error code */
console.error(res.body.callback.code);
/* callback error message */
console.error(res.body.callback.message);
}
1.0.0-rc.41
published on 2023-10-26
- BosClient: support 'x-bce-process' in headers;
- BosClient: add createFolderShareUrl method for sharing links;
1.0.0-rc.40
1.0.0-rc.40(2023-06-19)
- BosClient: 'x-bce-security-token' considered in auth token.
1.0.0-rc.39
1.0.0-rc.39 (2023-06-16)
- BosClient: Add 'x-bce-security-token' when using generatePresignedUrl with sessionToken;
1.0.0-rc.38
1.0.0-rc.38(2023-02-16)
- BosClient: support symlink;
1.0.0-rc.37
BosClient: support 'x-bce-server-side-encryption'
, 'x-bce-restore-days'
, 'x-bce-restore-tier'
headers
1.0.0-rc.36
1.0.0-rc.35
- BOSClient: Just keep an array of all of buffers and concat at the end.