Skip to content

Build your personal knowledge base with Trilium Notes

fix(server): not building due to API change

Elian Doran181ee3ef6d53
diff --git a/src/routes/api/sender.ts b/src/routes/api/sender.ts
index 890eefa985..22eea766de 100644
--- a/src/routes/api/sender.ts
+++ b/src/routes/api/sender.ts
@@ -7,7 +7,7 @@ import sanitize_attribute_name from "../../services/sanitize_attribute_name.js";
import specialNotesService from "../../services/special_notes.js";
import { Request } from 'express';
-function uploadImage(req: Request) {
+async function uploadImage(req: Request) {
const file = req.file;
if (!file) {
@@ -24,7 +24,7 @@ function uploadImage(req: Request) {
return [400, "Invalid image content type."];
}
- const uploadedImageType = imageType(file.buffer);
+ const uploadedImageType = await imageType(file.buffer);
if (!uploadedImageType) {
return [400, "Unable to determine image type."];
}