bugfix
This commit is contained in:
parent
55604a025e
commit
d669757df9
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user