server: Fix import of non-text files

This commit is contained in:
Elian Doran 2024-07-14 15:19:29 +03:00
parent 595402adea
commit 79123b0c63
No known key found for this signature in database

View File

@ -49,9 +49,6 @@ function importImage(file: File, parentNote: BNote, taskContext: TaskContext) {
}
function importFile(taskContext: TaskContext, file: File, parentNote: BNote) {
if (typeof file.buffer !== "string") {
throw new Error("Invalid file content for text.");
}
const originalName = file.originalname;
const {note} = noteService.createNewNote({