Skip to content

Commit

Permalink
Merge pull request #89 from Dora-boots/master
Browse files Browse the repository at this point in the history
bump: 1.0.0-rc.38
  • Loading branch information
lurunze1226 authored Jun 14, 2023
2 parents 5f650dd + 1066527 commit 39e0e5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# CHANGELOG
## 1.0.0-rc.39(2023-06-14)

- BosClient: Add 'x-bce-security-token' when using generatePresignedUrl with sessionToken;
## 1.0.0-rc.38(2023-02-16)

- BosClient: support symlink;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@baiducloud/sdk",
"version": "1.0.0-rc.38",
"version": "1.0.0-rc.39",
"description": "Baidu Cloud Engine JavaScript SDK",
"main": "./index.js",
"browser": {
Expand Down
5 changes: 5 additions & 0 deletions src/bos_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ BosClient.prototype.generatePresignedUrl = function (bucketName, key, timestamp,

params.authorization = authorization;

if (config.sessionToken) {
params['x-bce-security-token'] = config.sessionToken;
}

return util.format('%s%s?%s', config.endpoint, resource, qs.encode(params));
};

Expand Down Expand Up @@ -950,6 +954,7 @@ BosClient.prototype.getObjectToFile = function (bucketName, key, filename, range
});
};


BosClient.prototype.copyObject = function (sourceBucketName, sourceKey, targetBucketName, targetKey, options) {
/* eslint-disable */
if (!sourceBucketName) {
Expand Down

0 comments on commit 39e0e5a

Please sign in to comment.