Skip to content

Build your personal knowledge base with Trilium Notes

support image/jpg as well, closes #2103

zadam5f22864a93c5
diff --git a/src/routes/api/image.js b/src/routes/api/image.js
index 33a43fd09f..e5c7181d27 100644
--- a/src/routes/api/image.js
+++ b/src/routes/api/image.js
@@ -34,7 +34,7 @@ function uploadImage(req) {
return [404, `Note ${noteId} doesn't exist.`];
}
- if (!["image/png", "image/jpeg", "image/gif", "image/webp", "image/svg+xml"].includes(file.mimetype)) {
+ if (!["image/png", "image/jpg", "image/jpeg", "image/gif", "image/webp", "image/svg+xml"].includes(file.mimetype)) {
return [400, "Unknown image type: " + file.mimetype];
}