|
@@ -342,7 +342,7 @@ class CloudStorageView(View):
|
|
|
res = json.loads(sts_qs[0]["data"])
|
|
|
return JsonResponse(status=200, data=res)
|
|
|
# 套餐id
|
|
|
- storage = '{uid}/vod{channel}/'.format(uid=uid, channel=channel)
|
|
|
+ # storage = '{uid}/vod{channel}/'.format(uid=uid, channel=channel)
|
|
|
bucket_name = ubqs[0]['bucket__bucket']
|
|
|
endpoint = ubqs[0]['bucket__endpoint']
|
|
|
region_id = ubqs[0]['bucket__region']
|
|
@@ -363,8 +363,8 @@ class CloudStorageView(View):
|
|
|
{
|
|
|
"Effect": "Allow",
|
|
|
"Action": "s3:*",
|
|
|
- "Resource": ["arn:aws:s3:::{bucket_name}/{uid_channel}/*".
|
|
|
- format(bucket_name=bucket_name,uid_channel=storage)]
|
|
|
+ "Resource": ["arn:aws:s3:::{bucket_name}/{uid}/*".
|
|
|
+ format(bucket_name=bucket_name,uid=uid)]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -385,7 +385,7 @@ class CloudStorageView(View):
|
|
|
'bucket_name': bucket_name,
|
|
|
'arn': response['FederatedUser']['Arn'],
|
|
|
'code': 0,
|
|
|
- 'storage': storage,
|
|
|
+ 'storage': uid,
|
|
|
'endTime': ubqs[0]['endTime'],
|
|
|
'ip': ip,
|
|
|
}
|