Fix: Remove BMP format and improve error handling for Vercel deployment

This commit is contained in:
danielvici123
2025-05-16 00:45:20 +02:00
parent d478acc6e3
commit 8ec2dc6506
2 changed files with 12 additions and 19 deletions

View File

@@ -34,9 +34,6 @@ export async function POST(req: NextRequest) {
case 'gif':
convertedBuffer = await sharpInstance.gif().toBuffer()
break
case 'bmp':
convertedBuffer = await sharpInstance.bmp().toBuffer()
break
default:
throw new Error('Unsupported format')
}
@@ -50,7 +47,7 @@ export async function POST(req: NextRequest) {
} catch (error) {
console.error('Conversion error:', error)
return NextResponse.json(
{ error: 'Error converting image' },
{ error: 'Error converting image. Make sure the input format is supported.' },
{ status: 500 }
)
}