Skip to content

Commit

Permalink
feat: add tip for exposing headers etags (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyie authored and PeterRao committed Jan 13, 2020
1 parent d65634a commit 9eb368a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ access.

### App setup

Fill in your bucket name and region in `app.js`: (Note: ensure port 9000 is not used)
Fill in your bucket name and region in `main.js`: (Note: ensure port 9000 is not used)

```js
var bucket = '<your bucket name>';
Expand Down
4 changes: 4 additions & 0 deletions lib/common/multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ proto._uploadPart = async function _uploadPart(name, uploadId, partNo, data, opt

const result = await this.request(params);

if (!result.res.headers.etag) {
throw new Error('Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html');
}

data.stream = null;
params.stream = null;
return {
Expand Down

0 comments on commit 9eb368a

Please sign in to comment.