mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 13:09:01 +01:00
fix(server): not building due to API change
This commit is contained in:
parent
289e33f479
commit
181ee3ef6d
@ -7,7 +7,7 @@ import sanitize_attribute_name from "../../services/sanitize_attribute_name.js";
|
|||||||
import specialNotesService from "../../services/special_notes.js";
|
import specialNotesService from "../../services/special_notes.js";
|
||||||
import { Request } from 'express';
|
import { Request } from 'express';
|
||||||
|
|
||||||
function uploadImage(req: Request) {
|
async function uploadImage(req: Request) {
|
||||||
const file = req.file;
|
const file = req.file;
|
||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
@ -24,7 +24,7 @@ function uploadImage(req: Request) {
|
|||||||
return [400, "Invalid image content type."];
|
return [400, "Invalid image content type."];
|
||||||
}
|
}
|
||||||
|
|
||||||
const uploadedImageType = imageType(file.buffer);
|
const uploadedImageType = await imageType(file.buffer);
|
||||||
if (!uploadedImageType) {
|
if (!uploadedImageType) {
|
||||||
return [400, "Unable to determine image type."];
|
return [400, "Unable to determine image type."];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user