Working on the s3 feature.

This commit is contained in:
charlesgauthereau
2025-07-29 09:53:38 +02:00
parent d3f465b5d4
commit a6b960ffb2
5 changed files with 45 additions and 49 deletions
+9 -1
View File
@@ -2,9 +2,17 @@ import path from "path";
import fs from "fs/promises";
import { NextResponse } from "next/server";
export async function GET({ params }: { params: Promise<{ fileName: string }> }) {
export async function GET(
request: Request,
{params}: { params: Promise<{ fileName: string }> }
) {
try {
const fileName = (await params).fileName;
console.log("fileName", fileName);
const filePath = path.join(process.cwd(), "private/uploads/images", fileName);
// Check if the file exists