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: signatureUrl refactor and support callback #408

Merged
merged 5 commits into from
Mar 29, 2018
Merged

feat: signatureUrl refactor and support callback #408

merged 5 commits into from
Mar 29, 2018

Conversation

duan007a
Copy link
Contributor

@duan007a duan007a commented Mar 27, 2018

feat: signatureUrl refactor and support callback,Close #135

README.md Outdated
- [host] {String} set the host for callback
- [body] {String} set the body for callback
- [contentType] {String} set the type for body
- [customValue] {Object} set the custom value for callback,eg. {var1: value1,var2:value2}
Copy link
Contributor

Choose a reason for hiding this comment

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

文档中[]代表可选参数
callback中url 和 body是必要参数 不要加[]

subResource.callback = new Buffer(JSON.stringify(callback)).toString('base64');
}

if (hasCBVElements) {
Copy link
Contributor

Choose a reason for hiding this comment

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

callbackVar的值 需要特殊处理的,可以参考callback.js

host: 'oss-demo.aliyuncs.com',
contentType: 'application/json',
customValue: {
'x:key1': 'value1',
Copy link
Contributor

Choose a reason for hiding this comment

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

目前callback对外暴露给用户的callback-var 这个参数是一个key value形式,这个 x:需要我们内部进行处理

if (Object.prototype.hasOwnProperty.call(options, 'callback')) {
const json = {
callbackUrl: encodeURI(options.callback.url),
callbackBody: options.callback.body,
Copy link
Contributor

Choose a reason for hiding this comment

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

这里url或body 用户层面可能还是会传进来空值,建议这里还是要做下判断,给用户一个提示,抛出异常
url || body 为空即可抛出异常

@PeterRao PeterRao merged commit 343938f into ali-sdk:master Mar 29, 2018
popomore added a commit that referenced this pull request Apr 3, 2018
popomore added a commit that referenced this pull request Apr 3, 2018
* Revert "Create ISSUE_TEMPLATE.md"

This reverts commit 53c024a.

* Revert "chroe: build 4.14.1"

This reverts commit 18f2f5e.

* Revert "chore(release): 4.14.1"

This reverts commit d3f6b13.

* Revert "fix: signUtils header sort err fix (#418)"

This reverts commit 60383ee.

* Revert "chore: bump 4.14.0"

This reverts commit a617866.

* Revert "chore(release): 4.14.0"

This reverts commit 4d3e7fe.

* Revert "chore: remove the temp file"

This reverts commit b9a2cec.

* Revert "fix: _resumeMultipart not use yield"

This reverts commit ba2382b.

* Revert "fix(Browser): multipartUpload InvalidPartOrderError by doneParts repeat (#414)"

This reverts commit 2b0967f.

* Revert "feat: browser support blob (#409)"

This reverts commit e8a78b5.

* Revert "feat(browser): multipartUpload err will cancel this task (#399)"

This reverts commit 64f8d68.

* Revert "feat: signatureUrl refactor and support callback (#408)"

This reverts commit 343938f.

* Revert "chore: Delete example build file (#410)"

This reverts commit 02b0efd.

* Revert "feat: rm unused test data (#401)"

This reverts commit 3d2ce4e.

* Revert "feat: add ignore (#397)"

This reverts commit 0f003aa.

* Revert "refactor: add eslint for es6 (#382)"

This reverts commit e3c1b54.

* Revert "fix: issues #386 (#390)"

This reverts commit 5b5ae3e.

* Revert "refactor: authorization refactor (#387)"

This reverts commit 59e245e.

* Revert "feat: expose sdk version with OSS (#389)"

This reverts commit 0bdc876.
@duan007a duan007a deleted the huaixu/presignURL branch April 12, 2018 03:23
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.

3 participants