filepath corrected
This commit is contained in:
@@ -4,6 +4,7 @@ import { join } from "path"
|
|||||||
|
|
||||||
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 query = await getQuery(event)
|
//const query = await getQuery(event)
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@@ -15,7 +16,8 @@ export default defineEventHandler(async (event) => {
|
|||||||
if (file == undefined)
|
if (file == undefined)
|
||||||
throw createError({ status: 400, message: "No file"})
|
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())
|
const filepath = join(def_filepath, userId.toString(), file.toString())
|
||||||
console.log(filepath)
|
console.log(filepath)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user