This commit is contained in:
jxxghp
2024-09-25 19:22:42 +08:00
parent 2da95fa4e6
commit f79364bc58
5 changed files with 32 additions and 16 deletions
@@ -99,6 +99,9 @@ class StorageBase(metaclass=ABCMeta):
def download(self, fileitem: schemas.FileItem, path: Path = None) -> Path:
"""
下载文件,保存到本地,返回本地临时文件地址
:param fileitem: 文件项
:param path: 文件保存路径
"""
pass
@@ -106,6 +109,8 @@ class StorageBase(metaclass=ABCMeta):
def upload(self, fileitem: schemas.FileItem, path: Path) -> Optional[schemas.FileItem]:
"""
上传文件
:param fileitem: 上传目录项
:param path: 本地文件路径
"""
pass