fix:上传前检测+上传次数限制

This commit is contained in:
lan
2022-12-27 13:27:23 +08:00
parent f070bdcece
commit c3022bff78
3 changed files with 11 additions and 35 deletions
-24
View File
@@ -9,30 +9,6 @@ from fastapi import UploadFile
import settings
class TencentCOS:
def __init__(self, bucket: str, region: str, secret_id: str, secret_key: str):
self.bucket = bucket
self.region = region
self.secret_id = secret_id
self.secret_key = secret_key
def upload(self, file: UploadFile, path: str) -> str:
# 上传文件
pass
def download(self, path: str) -> BinaryIO:
# 下载文件
pass
def delete(self, path: str) -> None:
# 删除文件
pass
def get_url(self, path: str) -> str:
# 获取文件访问链接
pass
class FileSystemStorage:
DATA_ROOT = Path(settings.DATA_ROOT)
STATIC_URL = settings.STATIC_URL