Releases: baidubce/bce-sdk-js
Releases · baidubce/bce-sdk-js
1.0.2
published on 2024-09-24
What's Changed
- support global config
customGenerateUrl
to set custom endpoint. by @sqzhou in #118 - support
x-bce-source
header by @sqzhou in #117 - fix optional-chaining-assign syntax not transformed issue. by @Dora-boots in #119
Full Changelog: 1.0.1...1.0.2
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.