Desc:
- Penambahan api get foto profile
This commit is contained in:
2023-10-04 17:55:56 +08:00
parent 50c4e3c745
commit 90692d7eff

View File

@@ -0,0 +1,11 @@
import { NextRequest, NextResponse } from "next/server";
import fs from 'fs'
export async function GET(req: NextRequest, { params }: { params: { name: string } }) {
const fl = fs.readFileSync(`./public/img/${params.name}`)
return new NextResponse(fl, {
headers: {
"Content-Type": "image/png"
}
})
}