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: support callback options for put and multipartUpload #379

Merged
merged 8 commits into from
Mar 5, 2018

Conversation

binghaiwang
Copy link
Contributor

1.support callback options for put and multipartUpload

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

Choose a reason for hiding this comment

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

合并callbackVar到 callback里面

Copy link
Contributor Author

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

Choose a reason for hiding this comment

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

callback里面参数省略 callback 前缀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

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

Choose a reason for hiding this comment

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

callbackServer 最为配置变量移到别处,会给开发者造成困惑。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@codecov-io
Copy link

codecov-io commented Mar 2, 2018

Codecov Report

Merging #379 into master will decrease coverage by 71.8%.
The diff coverage is 11.53%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
lib/managed_upload.js 13.98% <0%> (-81.82%) ⬇️
lib/common/multipart-copy.js 7.92% <0%> (-90.08%) ⬇️
lib/object.js 12.76% <33.33%> (-83.65%) ⬇️
lib/common/multipart.js 10.71% <50%> (-86.85%) ⬇️
lib/common/callback.js 6.25% <6.25%> (ø)
lib/bucket.js 12.28% <0%> (-85.97%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e42a534...63dbb6b. Read the comment docs.

@PeterRao PeterRao merged commit 46c8dec into ali-sdk:master Mar 5, 2018
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