Skip to content

Commit

Permalink
修改 demo
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Jan 3, 2019
1 parent 0b1680e commit 8cbbb56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions server/sts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ var config = {
allowPrefix: '_ALLOW_DIR_/*',
// 简单上传和分片,需要以下的权限,其他权限列表请看 https://cloud.tencent.com/document/product/436/14048
allowActions: [
// 所有 action 请看文档 https://cloud.tencent.com/document/product/436/31923
// 简单上传
'name/cos:PutObject',
// 分片上传
'name/cos:InitiateMultipartUpload',
'name/cos:ListMultipartUploads',
'name/cos:ListParts',
Expand Down
3 changes: 2 additions & 1 deletion server/sts.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
'region' => 'ap-guangzhou', // 换成 bucket 所在园区
'durationSeconds' => 1800, // 密钥有效期
'allowPrefix' => '*', // 必填,这里改成允许的路径前缀,这里可以根据自己网站的用户登录态判断允许上传的目录,例子:* 或者 a/* 或者 a.jpg
// 密钥的权限列表。简单上传和分片需要以下的权限,其他权限列表请看 https://cloud.tencent.com/document/product/436/14048
// 密钥的权限列表
'allowActions' => array (
// 所有 action 请看文档 https://cloud.tencent.com/document/product/436/31923
// 简单上传
'name/cos:PutObject',
// 分片上传
Expand Down

0 comments on commit 8cbbb56

Please sign in to comment.