More image support

This commit is contained in:
city-unit 2023-08-30 15:33:39 -04:00
parent dfd6961c2a
commit 86c0974a6e
1 changed files with 1 additions and 1 deletions

View File

@ -2662,7 +2662,7 @@ app.post('/uploadimage', jsonParser, async (request, response) => {
}
// Extracting the base64 data and the image format
const match = request.body.image.match(/^data:image\/(png|jpg|webp);base64,(.+)$/);
const match = request.body.image.match(/^data:image\/(png|jpg|webp|jpeg|gif);base64,(.+)$/);
if (!match) {
return response.status(400).send({ error: "Invalid image format" });
}