fix: working on adding internal postgres database.

This commit is contained in:
charlesgauthereau
2026-02-14 22:23:04 +01:00
parent 12535a59e8
commit b4da6fdd9f
16 changed files with 118 additions and 454 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
import {NextResponse} from "next/server";
import fs from "fs";
import path from "path";
import {env} from "@/env.mjs";
export async function POST(request: Request) {
@@ -29,7 +30,8 @@ export async function POST(request: Request) {
}
const uploadDir = path.join(process.cwd(), "/private/uploads/");
// const uploadDir = path.join(process.cwd(), "/private/uploads/");
const uploadDir = path.join(env.PRIVATE_PATH, "/uploads/");
const oldFilePath = path.join(uploadDir, "tmp", id);
const newFilePath = path.join(uploadDir, filePath);