2025/04/13 周日 15:08:24.35
This commit is contained in:
parent
a888283dab
commit
21ad901377
@ -4,6 +4,8 @@ import time
|
|||||||
import os
|
import os
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
import logging
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class QiniuStorage:
|
class QiniuStorage:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -55,7 +57,9 @@ class QiniuStorage:
|
|||||||
'url': private_url,
|
'url': private_url,
|
||||||
'msg': '上传成功'
|
'msg': '上传成功'
|
||||||
}
|
}
|
||||||
|
# 在 except 中添加日志
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.error(f"七牛云上传失败: {str(e)}")
|
||||||
return {
|
return {
|
||||||
'code': 400,
|
'code': 400,
|
||||||
'msg': f'上传失败:{str(e)}'
|
'msg': f'上传失败:{str(e)}'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user