Fix TypeScript build error for Buffer to NextResponse

This commit is contained in:
AyrisAI
2026-05-14 02:00:48 +03:00
parent 4a9196f483
commit 1c088ff6b9

View File

@@ -28,7 +28,7 @@ export async function GET(
return NextResponse.json({ error: "Ek bulunamadı" }, { status: 404 });
}
return new NextResponse(att.content, {
return new NextResponse(new Uint8Array(att.content), {
headers: {
"Content-Type": att.contentType,
"Content-Disposition": `attachment; filename="${encodeURIComponent(filename)}"`,