This commit is contained in:
yumoqing 2024-12-22 15:06:05 +08:00
parent 9b6872bdd9
commit 564b8e802f

View File

@ -8,6 +8,7 @@ from aiohttp.web import StreamResponse
from aiohttp import web
from appPublic.rc4 import RC4
from appPublic.registerfunction import RegisterFunction
from appPublic.log import debug
from .filestorage import FileStorage
crypto_aim = 'God bless USA and others'
@ -55,9 +56,11 @@ async def file_download(request, filepath, content_type=None):
raise HTTPNotFound
async def path_download(request, kw, *params):
debug(f'path_download(): {kw=}, {params=}')
path = kw.get('path')
fs = FileStorage()
fp = fs.realPath(path)
debug(f'path_download():download filename={fp}')
return await file_download(request, fp)
rf = RegisterFunction()