-
Notifications
You must be signed in to change notification settings - Fork 576
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: support callback options for put and multipartUpload #379
Conversation
README.md
Outdated
- [callbackHost] {String} The host header value for initiating callback requests. | ||
- callbackBody {String} The value of the request body when a callback is initiated, for example, key=$(key)&etag=$(etag)&my_var=$(x:my_var). | ||
- [callbackBodyType] {String} The Content-Type of the callback requests initiatiated, It supports application/x-www-form-urlencoded and application/json, and the former is the default value. | ||
- [callbackVar] {Object} Custom parameters are a map of key-values<br> |
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.
合并callbackVar到 callback里面
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.
fixed
@@ -793,29 +793,21 @@ parameters: | |||
- [mime] {String} custom mime, will send with `Content-Type` entity header | |||
- [meta] {Object} user meta, will send with `x-oss-meta-` prefix string | |||
e.g.: `{ uid: 123, pid: 110 }` | |||
- [callback] {Object} The callback parameter is composed of a JSON string encoded in Base64,detail [see](https://www.alibabacloud.com/help/doc-detail/31989.htm)<br> |
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.
callback里面参数省略 callback 前缀
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.
fixed
test/browser.tests.js
Outdated
describe('browser', function () { | ||
before(function* () { | ||
ossConfig = { | ||
region: stsConfig.region, | ||
accessKeyId: stsConfig.Credentials.AccessKeyId, | ||
accessKeySecret: stsConfig.Credentials.AccessKeySecret, | ||
stsToken: stsConfig.Credentials.SecurityToken, | ||
bucket: stsConfig.bucket | ||
bucket: stsConfig.bucket, | ||
callbackServer: 'http://oss-demo.aliyuncs.com:23450' //oss demo callback server an ecs, used with PutObject、PostObject、CompleteMultipartUpload |
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.
callbackServer 最为配置变量移到别处,会给开发者造成困惑。
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.
fixed
Codecov Report
@@ Coverage Diff @@
## master #379 +/- ##
===========================================
- Coverage 96.26% 24.45% -71.81%
===========================================
Files 12 13 +1
Lines 1552 1574 +22
Branches 293 299 +6
===========================================
- Hits 1494 385 -1109
- Misses 58 1189 +1131
Continue to review full report at Codecov.
|
1.support callback options for put and multipartUpload