basic webp support

This commit is contained in:
zadam
2019-06-23 15:22:05 +02:00
parent f45e25172b
commit 5d213eea7e
4 changed files with 10 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ async function uploadImage(req) {
return [404, `Note ${noteId} doesn't exist.`];
}
if (!["image/png", "image/jpeg", "image/gif"].includes(file.mimetype)) {
if (!["image/png", "image/jpeg", "image/gif", "image/webp"].includes(file.mimetype)) {
return [400, "Unknown image type: " + file.mimetype];
}