Skip to content

Commit b34f607

Browse files
Convert Buffer to Uint8Array for NextResponse compatibility
1 parent 89ff564 commit b34f607

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/api/documents/[state]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export async function GET(_req: Request, ctx: { params: Promise<{ state: string
3333
}
3434

3535
// Return document as PDF
36-
// Send buffer directly instead of converting to Uint8Array
37-
return new NextResponse(documentContent, {
36+
// Convert Buffer to Uint8Array for NextResponse compatibility
37+
return new NextResponse(new Uint8Array(documentContent), {
3838
status: 200,
3939
headers: {
4040
'Content-Type': 'application/pdf',

0 commit comments

Comments
 (0)