Skip to content

Commit 4a13609

Browse files
committed
docs: add changeHeaders
1 parent 6f6ce99 commit 4a13609

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/nodejs-sdk-v7.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,30 @@ bucketManager.changeMime(bucket, key, newMime, function(err, respBody, respInfo)
499499
});
500500
```
501501

502+
<a id="rs-chgm-h"></a>
503+
## 修改文件Headers
504+
505+
```
506+
var bucket = 'if-pbl';
507+
var key = 'qiniu.mp4';
508+
var headers = {
509+
'Content-Type': 'application/octet-stream',
510+
'Last-Modified': 'Web, 21 Oct 2015 07:00:00 GMT',
511+
'x-custom-header-xx': 'value',
512+
};
513+
514+
bucketManager.changeHeaders(bucket, key, headers, function(err, respBody, respInfo) {
515+
if (err) {
516+
console.log(err);
517+
//throw err;
518+
} else {
519+
//200 is success
520+
console.log(respInfo.statusCode);
521+
console.log(respBody);
522+
}
523+
});
524+
```
525+
502526
<a id="rs-chtype"></a>
503527
## 修改文件存储类型
504528

0 commit comments

Comments
 (0)