-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
🐣 Is your feature request related to a problem? Please describe.
for static files, maybe store gz file on other location or dynamic generate
💡 Describe the solution you'd like
web_fileresponse.py
def my_gz_handler(request):
filename = request.match_info['filename']
return '/mygz/a.txt.gz'
app.router.add_static(prefix,path,gz_handler=my_gz_handler)
class FileResponse:
def __init__(filepath,chunk_size,gz_handler=None):
pass
async def prepare(self,request):
...
if self.gz_handler:
gz_filename = self.gz_handler(request)❓ Describe alternatives you've considered
Now,I must copy web_fileresponse.py,and rewrite gzip part code