|
@@ -183,12 +183,6 @@ class MassageView(View):
|
|
|
params['Bucket'] = 'foreignpush'
|
|
|
img_url = aws_s3.generate_presigned_url(
|
|
|
'get_object', Params=params, ExpiresIn=300)
|
|
|
- elif storage_location in [3, 4]: # 国外OCI云
|
|
|
- prefix_name = f'{uid}/'
|
|
|
- oci = oci_eur if storage_location == 4 else oci_us
|
|
|
- img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)
|
|
|
- if img_url:
|
|
|
- img_url = img_url + thumbspng
|
|
|
else: # AWS国内
|
|
|
params['Bucket'] = 'push'
|
|
|
img_url = aws_s3_cn.generate_presigned_url(
|
|
@@ -239,6 +233,12 @@ class MassageView(View):
|
|
|
thumbspng = '{}/{}/{}_{}.jpeg'.format(uid, channel, event_time, i)
|
|
|
if storage_location == 1: # 阿里云oss
|
|
|
img_url = oss_img_bucket.sign_url('GET', thumbspng, 300)
|
|
|
+ elif storage_location in [3, 4]: # 国外OCI云
|
|
|
+ prefix_name = f'{uid}/'
|
|
|
+ oci = oci_eur if storage_location == 4 else oci_us
|
|
|
+ img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)
|
|
|
+ if img_url:
|
|
|
+ img_url = img_url + thumbspng
|
|
|
else:
|
|
|
params = {'Key': thumbspng}
|
|
|
if region == 1: # 国外AWS
|