Skip to content

Commit

Permalink
Key 拼接 url 用 camSafeUrlEncode
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Dec 7, 2018
1 parent cf7ca67 commit b090acc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/cos-js-sdk-v5.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ var util = {
filter: filter,
clone: clone,
uuid: uuid,
camSafeUrlEncode: camSafeUrlEncode,
throttleOnProgress: throttleOnProgress,
getFileSize: getFileSize,
isBrowser: true
Expand Down Expand Up @@ -1939,7 +1940,7 @@ base.init(COS, task);
advance.init(COS, task);

COS.getAuthorization = util.getAuth;
COS.version = '0.5.0';
COS.version = '0.5.1';

module.exports = COS;

Expand Down Expand Up @@ -5768,7 +5769,7 @@ function getUrl(params) {
}
url += '/';
if (object) {
url += encodeURIComponent(object).replace(/%2F/g, '/');
url += util.camSafeUrlEncode(object).replace(/%2F/g, '/');
}

if (params.isLocation) {
Expand Down
2 changes: 1 addition & 1 deletion dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/cos.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ base.init(COS, task);
advance.init(COS, task);

COS.getAuthorization = util.getAuth;
COS.version = '0.5.0';
COS.version = '0.5.1';

module.exports = COS;

0 comments on commit b090acc

Please sign in to comment.