path corrected

This commit is contained in:
2026-01-19 13:56:44 +00:00
parent 8ef2cc952e
commit 6b08f55983

View File

@@ -5,7 +5,7 @@ import { decode } from "node:punycode"
export default defineEventHandler(async (event) => {
const session = await getUserSession(event)
const conf = await useRuntimeConfig()
const conf = useRuntimeConfig()
//const query = await getQuery(event)
// @ts-ignore
@@ -20,8 +20,8 @@ export default defineEventHandler(async (event) => {
file = decodeURI(file)
//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())
const def_filepath = conf.download_path
const filepath = join(def_filepath, userId.toString(), file)
console.log(filepath)
if (!existsSync(filepath))