mirror of
https://github.com/danielvici/tool-website.git
synced 2026-01-16 20:51:25 +00:00
fix error
This commit is contained in:
@@ -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}"`,
|
||||||
|
|||||||
Reference in New Issue
Block a user