This commit is contained in:
lwl0608 2024-04-29 11:54:59 +08:00
parent 10b8bc68b0
commit f799a978ca
1 changed files with 1 additions and 2 deletions

View File

@ -10,7 +10,6 @@ logger = Logger(service_name, log_dir=log_dir)
access_key_id = "LTAI5tAdu5LRvZwm4LJa21Fo"
access_key_secret = "WGvSQsDralTfFAAxhEqLBOgbXqflHo"
endpoint_internal = "https://oss-cn-hangzhou-internal.aliyuncs.com"
# endpoint_internal = "https://oss-cn-hangzhou.aliyuncs.com"
bucket_name = "wishpal-ironfan-media"
@ -32,7 +31,7 @@ class S:
for lp in self.del_images:
os.remove(lp)
cnt += 1
logger.Info("{} files removed".format(cnt))
print("{} files removed".format(cnt))
def upload_img_to_oss(self, local_path: str, oss_src_id: str):
return self.bucket.put_object_from_file(oss_src_id, local_path)