mirror of
https://github.com/danielvici/tool-website.git
synced 2026-01-16 21:51:26 +00:00
Fix: Remove BMP format and improve error handling for Vercel deployment
This commit is contained in:
@@ -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 }
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user