This commit is contained in:
jxxghp
2024-11-16 09:25:46 +08:00
parent af3a50f7ea
commit f6a2efb256
8 changed files with 31 additions and 27 deletions

View File

@@ -119,11 +119,12 @@ class StorageBase(metaclass=ABCMeta):
pass
@abstractmethod
def upload(self, fileitem: schemas.FileItem, path: Path) -> Optional[schemas.FileItem]:
def upload(self, fileitem: schemas.FileItem, path: Path, new_name: str = None) -> Optional[schemas.FileItem]:
"""
上传文件
:param fileitem: 上传目录项
:param path: 本地文件路径
:param new_name: 上传后文件名
"""
pass