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