Spaces:
Runtime error
Runtime error
Update oss_utils.py
Browse files- oss_utils.py +6 -4
oss_utils.py
CHANGED
@@ -27,13 +27,15 @@ def get_random_string():
|
|
27 |
|
28 |
class ossService():
|
29 |
def __init__(self):
|
|
|
|
|
30 |
self.AccessKeyId = OSSAccessKeyId
|
31 |
self.AccessKeySecret = OSSAccessKeySecret
|
32 |
-
self.Endpoint =
|
33 |
if use_internal_network:
|
34 |
-
self.Endpoint = "
|
35 |
-
self.BucketName = "vigen-invi" # "vigen-video"
|
36 |
-
self.ObjectName = "video_generation" # "VideoGeneration"
|
37 |
self.Prefix = "oss://" + self.BucketName
|
38 |
|
39 |
auth = oss2.Auth(self.AccessKeyId, self.AccessKeySecret)
|
|
|
27 |
|
28 |
class ossService():
|
29 |
def __init__(self):
|
30 |
+
# print(f'AK: ******{OSSAccessKeyId[-3:]}')
|
31 |
+
# print(f'SK: ******{OSSAccessKeySecret[-3:]}')
|
32 |
self.AccessKeyId = OSSAccessKeyId
|
33 |
self.AccessKeySecret = OSSAccessKeySecret
|
34 |
+
self.Endpoint = OSSEndpoint
|
35 |
if use_internal_network:
|
36 |
+
self.Endpoint = OSSEndpoint[:-len(".aliyuncs.com")] + "-internal.aliyuncs.com"
|
37 |
+
self.BucketName = OSSBucketName # "vigen-invi" # "vigen-video"
|
38 |
+
self.ObjectName = OSSObjectName # "video_generation" # "VideoGeneration"
|
39 |
self.Prefix = "oss://" + self.BucketName
|
40 |
|
41 |
auth = oss2.Auth(self.AccessKeyId, self.AccessKeySecret)
|