对象存储限制上传文件大小的策略是不是有问题?
IceOfSummer opened this issue · comments
DeSen Xu commented
试了一下下面两种策略,照着案例二写的,上传后全是403 Access Denied,把condition
删掉就可以正常上传了
{
"version": "2.0",
"statement": [
{
"effect": "allow",
"action": [
"cos:PutObject"
],
"resource": [
"qcs::cos:ap-guangzhou:uid/xx:xxxx/*"
],
"condition": {
"numeric_not_equal": {"cos:content_length": 0}
}
}
]
}
{
"version": "2.0",
"statement": [
{
"effect": "allow",
"action": [
"cos:PutObject",
],
"resource": [
"qcs::cos:ap-guangzhou:uid/1310819360:wtuapp-cdn-1310819360/*"
],
"condition": {
"numeric_equal": {"cos:content_length": 0}
}
}
]
}
一个是判断内容长度是不是0,另外一个是不是非零,俩个全是403。。。
dhaichen commented
经确认,条件键的名称写错了,是 content-length,不是 content_length。