fix error

This commit is contained in:
danielvici123
2025-12-07 00:04:38 +01:00
parent ec3ee960be
commit c7415b60fc

View File

@@ -47,7 +47,7 @@ export async function POST(req: NextRequest) {
throw new Error('Unsupported format') throw new Error('Unsupported format')
} }
return new NextResponse(convertedBuffer, { return new NextResponse(convertedBuffer.buffer as ArrayBuffer, {
headers: { headers: {
'Content-Type': `image/${format}`, 'Content-Type': `image/${format}`,
'Content-Disposition': `attachment; filename="converted.${format}"`, 'Content-Disposition': `attachment; filename="converted.${format}"`,