mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
server-ts: Convert etapi/notes
This commit is contained in:
@@ -88,6 +88,13 @@ function updateImage(req: AppRequest) {
|
||||
|
||||
const note = becca.getNoteOrThrow(noteId);
|
||||
|
||||
if (!file) {
|
||||
return {
|
||||
uploaded: false,
|
||||
message: `Missing image data.`
|
||||
};
|
||||
}
|
||||
|
||||
if (!["image/png", "image/jpeg", "image/gif", "image/webp", "image/svg+xml"].includes(file.mimetype)) {
|
||||
return {
|
||||
uploaded: false,
|
||||
|
||||
Reference in New Issue
Block a user