mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
file upload WIP
This commit is contained in:
@@ -63,7 +63,7 @@ function uploadImage(req) {
|
||||
const {noteId} = req.query;
|
||||
const {file} = req;
|
||||
|
||||
const note = becca.getNoteOrThrow(noteId);
|
||||
becca.getNoteOrThrow(noteId);
|
||||
|
||||
if (!["image/png", "image/jpg", "image/jpeg", "image/gif", "image/webp", "image/svg+xml"].includes(file.mimetype)) {
|
||||
throw new ValidationError(`Unknown image type '${file.mimetype}'`);
|
||||
|
||||
Reference in New Issue
Block a user