From ac0f5fc46d73380b3b71b680d2fdabd9089017c1 Mon Sep 17 00:00:00 2001 From: suricata Date: Sat, 17 Jan 2026 17:02:41 +0000 Subject: [PATCH] filepath corrected --- server/routes/download/[file].get.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/routes/download/[file].get.ts b/server/routes/download/[file].get.ts index f3674ee..69d6cb5 100644 --- a/server/routes/download/[file].get.ts +++ b/server/routes/download/[file].get.ts @@ -4,6 +4,7 @@ import { join } from "path" export default defineEventHandler(async (event) => { const session = await getUserSession(event) + const conf = await useRuntimeConfig() //const query = await getQuery(event) // @ts-ignore @@ -15,7 +16,8 @@ export default defineEventHandler(async (event) => { if (file == undefined) throw createError({ status: 400, message: "No file"}) - const def_filepath = "/home/suricatingss/Projects/WebStorm/yt2mp3/server/fastapi_server/downloads"; + //const def_filepath = "/home/suricatingss/Projects/WebStorm/yt2mp3/server/fastapi_server/downloads"; + const def_filepath = conf.download_url const filepath = join(def_filepath, userId.toString(), file.toString()) console.log(filepath)