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
+4 -3
View File
@@ -187,12 +187,13 @@ class LocalStorage(StorageBase):
"""
上传文件
"""
file_path = Path(fileitem.path)
code, message = SystemUtils.move(path, file_path)
dir_path = Path(fileitem.path)
target_path = dir_path / path.name
code, message = SystemUtils.move(path, target_path)
if code != 0:
logger.error(f"移动文件失败:{message}")
return None
return self.__get_diritem(file_path)
return self.__get_diritem(target_path)
def copy(self, fileitem: schemas.FileItem, target_file: Path) -> bool:
"""