-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(node): bucket policy #751
Conversation
README.md
Outdated
@@ -1066,6 +1070,72 @@ Success will return: | |||
|
|||
--- | |||
|
|||
### .putBucketPolicy(name, policy[, options]) | |||
|
|||
Adds policy for a bucket or modify the tags for a bucket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
test/node/bucket.test copy.js
Outdated
@@ -0,0 +1,111 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件的命名是什么意思
/** | ||
* putBucketPolicy | ||
* @param {String} bucketName - bucket name | ||
* @param {Object} options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释补齐参数
README.md
Outdated
|
||
Success will return: | ||
|
||
- policy {Object || String} the policy of bucket, if not exist, the value is null string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 ""。 这个null string,还以为是 null
。
解决下冲突 |
let policy = null; | ||
|
||
if (result.res.status === 200) { | ||
policy = JSON.parse(result.res.data.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果直接getBucketPolicy是否会报错,正常 JSON.parse('') 是会报错的
* fix: _unSupportBrowserTip (#755) * fix: checkBucketName bug (#749) * feat: image processing (#744) close #676 * feat: putBucketWebsite support new parameter (#736) * feat: support for the latest putBucketLifecycle api features (#757) * feat: signatureUrl support trafficLimit (#756) * feat(node): bucket policy (#751) * test: getBucketTags/getObjectTagging/calculatePostSignature (#739) * test: getBucketTags/getObjectTagging/calculatePostSignature * fix: trafficLimit error * chore: browserify close debug (#759) * fix: add successStatus (#762) * fix: checkBucketName bug (#763) * fix: add CORS for server-side-encryption * chore: bump 6.6.0 Co-authored-by: 冷若霜寒 <912881342@qq.com>
* fix: _unSupportBrowserTip (#755) * fix: checkBucketName bug (#749) * feat: image processing (#744) close #676 * feat: putBucketWebsite support new parameter (#736) * feat: support for the latest putBucketLifecycle api features (#757) * feat: signatureUrl support trafficLimit (#756) * feat(node): bucket policy (#751) * test: getBucketTags/getObjectTagging/calculatePostSignature (#739) * test: getBucketTags/getObjectTagging/calculatePostSignature * fix: trafficLimit error * chore: browserify close debug (#759) * fix: add successStatus (#762) * fix: checkBucketName bug (#763) * fix: add CORS for server-side-encryption * chore: bump 6.6.0 * fix: proto.put TypeError text (#771) * refactor: replace is.blob & is.file with isBlob & isFile (#776) * feat: multiversion (#750) * chore: bump 6.8.0-beta * refactor: multiversion (#781) * fix: browser端,去除没有使用的 sha256.js 文件 (#780) * chore: change and delete the bucket used for test (#783) * fix: putBucketWebsite testting (#785) * chore: fix test case Co-authored-by: 冷若霜寒 <912881342@qq.com> Co-authored-by: microJ <microJ@users.noreply.github.com>
* fix: _unSupportBrowserTip (#755) * fix: checkBucketName bug (#749) * feat: image processing (#744) close #676 * feat: putBucketWebsite support new parameter (#736) * feat: support for the latest putBucketLifecycle api features (#757) * feat: signatureUrl support trafficLimit (#756) * feat(node): bucket policy (#751) * test: getBucketTags/getObjectTagging/calculatePostSignature (#739) * test: getBucketTags/getObjectTagging/calculatePostSignature * fix: trafficLimit error * chore: browserify close debug (#759) * fix: add successStatus (#762) * fix: checkBucketName bug (#763) * fix: add CORS for server-side-encryption * chore: bump 6.6.0 * fix: proto.put TypeError text (#771) * refactor: replace is.blob & is.file with isBlob & isFile (#776) * feat: multiversion (#750) * chore: bump 6.8.0-beta * refactor: multiversion (#781) * fix: browser端,去除没有使用的 sha256.js 文件 (#780) * chore: change and delete the bucket used for test (#783) * fix: putBucketWebsite testting (#785) * chore: fix test case * fix: getBucketVersions result has no prefixes (#799) * feat(node): uploadPart support file stream (#798) * refactor: refactor cleanBucket delete (#803) * test: add firefox test in browsers (#804) * feat: browser端,将 is-type-of 包的依赖处理为 shim (#801) * feat: update mime, use mime/lite replace mime and use shims/debug.js replace debug in browser (#802) * fix: putStream can not close request when stream destroyed (#782) * fix: delete unless code and delete invalid Content-Type (#805) * test: test content-type without MIME (#806) * chore: merge master fix * chore: travis fix Co-authored-by: 冷若霜寒 <912881342@qq.com> Co-authored-by: microJ <microJ@users.noreply.github.com>
No description provided.