From ae0ed2f5912b97833870fa0902109f4a5b869e37 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 29 Jul 2025 15:24:48 +0800 Subject: [PATCH] bugfix --- filemgr/filemgr.py | 2 ++ wwwroot/upload_file.dspy | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 wwwroot/upload_file.dspy diff --git a/filemgr/filemgr.py b/filemgr/filemgr.py index 8e5437c..840b209 100644 --- a/filemgr/filemgr.py +++ b/filemgr/filemgr.py @@ -50,6 +50,8 @@ class FileMgr: "hashvalue": hashvalue } await sor.C('file', ns) + return True + return False async def del_file(request, fid): db = DBPools() diff --git a/wwwroot/upload_file.dspy b/wwwroot/upload_file.dspy new file mode 100644 index 0000000..1e47b37 --- /dev/null +++ b/wwwroot/upload_file.dspy @@ -0,0 +1,5 @@ +fmgr = FileMgr() +stat = await fmgr.add_file(request, params_kw) +if stat: + return UiMessage(title='Add file', message='file add success') +return UiError(title='Add file', message='file add failed')