mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server: Fix import of non-text files
This commit is contained in:
parent
595402adea
commit
79123b0c63
@ -49,9 +49,6 @@ function importImage(file: File, parentNote: BNote, taskContext: TaskContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function importFile(taskContext: TaskContext, file: File, parentNote: BNote) {
|
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 originalName = file.originalname;
|
||||||
|
|
||||||
const {note} = noteService.createNewNote({
|
const {note} = noteService.createNewNote({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user