From 1c088ff6b9736df48630254f3136021c353b8d5a Mon Sep 17 00:00:00 2001 From: AyrisAI Date: Thu, 14 May 2026 02:00:48 +0300 Subject: [PATCH] Fix TypeScript build error for Buffer to NextResponse --- app/api/mail/messages/[uid]/attachments/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mail/messages/[uid]/attachments/route.ts b/app/api/mail/messages/[uid]/attachments/route.ts index 479fa30..d04c1e8 100644 --- a/app/api/mail/messages/[uid]/attachments/route.ts +++ b/app/api/mail/messages/[uid]/attachments/route.ts @@ -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)}"`,