new: Completed support for migrating images to Tencent Cloud COS

This commit is contained in:
yv1ing
2024-12-16 12:24:28 +08:00
parent 522a1d203e
commit 52e023d5b1
10 changed files with 180 additions and 2 deletions

13
uploader.py Normal file
View File

@@ -0,0 +1,13 @@
from picbed.cos import cos_upload_img
class Uploader:
def __init__(self):
pass
def upload_web_img(self, img_url, pic_bed):
if pic_bed == 'COS':
return cos_upload_img(img_url)
else:
print('Unsupported image hosting type')
exit(1)