feat: 支持用户管理
This commit is contained in:
@@ -26,7 +26,7 @@ export async function getTempKey(): Promise<TempKeyResult> {
|
||||
const region = process.env.COS_REGION || 'ap-guangzhou'
|
||||
const appid = process.env.COS_APPID || ''
|
||||
|
||||
// Define the policy for upload permissions
|
||||
// Define the policy for upload permissions (limited to mini_game/images/*)
|
||||
const policy = {
|
||||
version: '2.0',
|
||||
statement: [
|
||||
@@ -38,7 +38,7 @@ export async function getTempKey(): Promise<TempKeyResult> {
|
||||
effect: 'allow',
|
||||
principal: { qcs: ['qcs::cam::anyone:anyone'] },
|
||||
resource: [
|
||||
`qcs::cos:${region}:uid/${appid}:${bucket}/*`,
|
||||
`qcs::cos:${region}:uid/${appid}:${bucket}/mini_game/images/*`,
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user