From ac5dc1bf351747eca614a76bb780046b1fa1a679 Mon Sep 17 00:00:00 2001 From: dxstiny Date: Sun, 5 Feb 2023 17:51:35 +0100 Subject: [PATCH] new, server: fix #61 --- src/server/handler/download.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/handler/download.py b/src/server/handler/download.py index 4687d2ab9..bd0bd2e94 100644 --- a/src/server/handler/download.py +++ b/src/server/handler/download.py @@ -59,7 +59,9 @@ async def downloadTrack(self, request: web.Request) -> web.Response: res = web.FileResponse(pathAndName, headers=MultiDict({"Content-Disposition": f"Attachment;filename={filename}.mp3"})) - # TODO return res? + # NOTE, not: + # return res + # because we need to remove the file after it has been sent await res.prepare(request) await res.write_eof()