This commit is contained in:
lwl0608 2024-04-29 11:55:43 +08:00
parent f799a978ca
commit 478ca29fa9
1 changed files with 2 additions and 1 deletions

View File

@ -26,12 +26,13 @@ class S:
self.del_images = list()
def __del__(self):
self.col_image.close()
cnt = 0
for lp in self.del_images:
os.remove(lp)
cnt += 1
print("{} files removed".format(cnt))
self.col_image.close()
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)