Skip to content

Commit a31ab19

Browse files
authored
Update README.md
1 parent b909d8e commit a31ab19

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,14 @@ qcloud.cos.list('bucket', '/', 20, 'eListFileOnly');
4848
//获取指定目录下以'abc'开头的文件
4949
qcloud.cos.prefixSearch('bucket', '/firstDir/', 'abc', 20, 'eListFileOnly');
5050

51+
//设置文件权限以及自定义header
52+
var headers = {
53+
"Cache-Control": "no-cache",
54+
"Content-Type" : "application/json",
55+
"Content-Encoding" : "utf-8"
56+
};
57+
58+
qcloud_cos.cos.updateFile('0001', '123/test_slice.dat', 'newattr', 'eWRPrivate', headers, function(ret) {console.log(ret)});
59+
5160
```
5261

0 commit comments

Comments
 (0)