Skip to content
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

Merged
merged 1 commit into from
Mar 25, 2020
Merged

feat(node): bucket policy #751

merged 1 commit into from
Mar 25, 2020

Conversation

weiyie
Copy link
Contributor

@weiyie weiyie commented Mar 8, 2020

No description provided.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@@ -0,0 +1,111 @@

Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改成 ""。 这个null string,还以为是 null

@PeterRao
Copy link
Collaborator

解决下冲突

let policy = null;

if (result.res.status === 200) {
policy = JSON.parse(result.res.data.toString());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果直接getBucketPolicy是否会报错,正常 JSON.parse('') 是会报错的

@PeterRao PeterRao merged commit 2d2b33a into ali-sdk:develop Mar 25, 2020
PeterRao added a commit that referenced this pull request Apr 7, 2020
* 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>
PeterRao added a commit that referenced this pull request May 12, 2020
* 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>
PeterRao added a commit that referenced this pull request Jun 5, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants