Skip to content

Commit

Permalink
添加 policy 规则
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Aug 30, 2017
1 parent a0b6fbd commit aba0403
Show file tree
Hide file tree
Showing 2 changed files with 879 additions and 880 deletions.
5 changes: 2 additions & 3 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function putBucketPolicy() {
"name/cos:AppendObject"
],
// "resource": ["qcs::cos:cn-south:uid/1250000000:test-1250000000.cn-south.myqcloud.com//1250000000/test/*"] // 1250000000 是 appid
"resource": ["qcs::cos:" + config.Region + ":uid/" + AppId + ":" + Bucket + "-" + AppId + "." + config.Region + ".myqcloud.com//" + AppId + "/" + Bucket + "/*"] // 1250000000 是 appid
"resource": ["qcs::cos:" + config.Region + ":uid/" + AppId + ":" + Bucket + "-" + AppId + ".cos." + config.Region + ".myqcloud.com//" + AppId + "/" + Bucket + "/*"] // 1250000000 是 appid
}
]
},
Expand Down Expand Up @@ -354,13 +354,13 @@ function putObject() {
Bucket: config.Bucket, /* 必须 */
Region: config.Region,
Key: filename, /* 必须 */
Body: blob,
TaskReady: function (tid) {
TaskId = tid;
},
onProgress: function (progressData) {
console.log(JSON.stringify(progressData));
},
Body: blob
}, function (err, data) {
console.log(err || data);
});
Expand Down Expand Up @@ -493,7 +493,6 @@ function sliceUploadFile() {
TaskId = tid;
},
onHashProgress: function (progressData) {
console.log('onHashProgress', JSON.stringify(progressData));
},
onProgress: function (progressData) {
console.log('onProgress', JSON.stringify(progressData));
Expand Down
Loading

0 comments on commit aba0403

Please sign in to comment.