|
@@ -403,9 +403,9 @@ class DetectControllerViewV2(View):
|
|
if storage_location == 1: # 阿里云oss
|
|
if storage_location == 1: # 阿里云oss
|
|
img_url = oss_img_bucket.sign_url('GET', thumbspng, 300)
|
|
img_url = oss_img_bucket.sign_url('GET', thumbspng, 300)
|
|
elif storage_location == 5: # 华为云
|
|
elif storage_location == 5: # 华为云
|
|
- res = obs_client.createSignedUrl(
|
|
|
|
|
|
+ create_res = obs_client.createSignedUrl(
|
|
method='GET', bucketName=HUAWEICLOUD_PUSH_BUKET, objectKey=thumbspng, expires=300)
|
|
method='GET', bucketName=HUAWEICLOUD_PUSH_BUKET, objectKey=thumbspng, expires=300)
|
|
- img_url = res.signedUrl
|
|
|
|
|
|
+ img_url = create_res.signedUrl
|
|
elif storage_location in [3, 4]:
|
|
elif storage_location in [3, 4]:
|
|
prefix_name = f'{uid}/'
|
|
prefix_name = f'{uid}/'
|
|
img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)
|
|
img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)
|
|
@@ -468,9 +468,9 @@ class DetectControllerViewV2(View):
|
|
if storage_location == 1: # 阿里云oss
|
|
if storage_location == 1: # 阿里云oss
|
|
img_url = oss_img_bucket.sign_url('GET', thumbspng, 300)
|
|
img_url = oss_img_bucket.sign_url('GET', thumbspng, 300)
|
|
elif storage_location == 5: # 华为云
|
|
elif storage_location == 5: # 华为云
|
|
- res = obs_client.createSignedUrl(
|
|
|
|
|
|
+ create_res = obs_client.createSignedUrl(
|
|
method='GET', bucketName=HUAWEICLOUD_PUSH_BUKET, objectKey=thumbspng, expires=300)
|
|
method='GET', bucketName=HUAWEICLOUD_PUSH_BUKET, objectKey=thumbspng, expires=300)
|
|
- img_url = res.signedUrl
|
|
|
|
|
|
+ img_url = create_res.signedUrl
|
|
elif storage_location in [3, 4]: # 国外OCI云
|
|
elif storage_location in [3, 4]: # 国外OCI云
|
|
prefix_name = f'{uid}/'
|
|
prefix_name = f'{uid}/'
|
|
img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)
|
|
img_url = DetectControllerViewV2.oci_object_url(oci, redis_obj, uid, prefix_name)
|