Skip to content

Commit 9eb368a

Browse files
weiyiePeterRao
authored andcommitted
feat: add tip for exposing headers etags (#725)
1 parent d65634a commit 9eb368a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ access.
3030

3131
### App setup
3232

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

3535
```js
3636
var bucket = '<your bucket name>';

lib/common/multipart.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ proto._uploadPart = async function _uploadPart(name, uploadId, partNo, data, opt
239239

240240
const result = await this.request(params);
241241

242+
if (!result.res.headers.etag) {
243+
throw new Error('Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html');
244+
}
245+
242246
data.stream = null;
243247
params.stream = null;
244248
return {

0 commit comments

Comments
 (0)