This commit is contained in:
yumoqing 2025-07-30 11:19:33 +08:00
parent 55604a025e
commit d669757df9

View File

@ -29,6 +29,8 @@ class FileMgr:
hashvalue = get_file_hash(realpath)
dbname = get_dbname()
u = await get_session_userinfo(request)
if u is None:
return False
db = DBPools()
async with db.sqlorContext(dbname) as sor:
recs = await sor.R('file',{'hashvalue': hashvalue})
@ -46,7 +48,7 @@ class FileMgr:
"realpath": realpath,
"filetpye":params_kw.upfile.split('.')[-1].lower(),
"filesize":filesize,
"owner": u.userorgid,
"ownerid": u.userorgid,
"hashvalue": hashvalue
}
await sor.C('file', ns)