Merge pull request #208 from TriliumNext/bugfix/fix_importing_non_text_files

Unable to import a PDF file
This commit is contained in:
Elian Doran 2024-07-14 17:14:04 +03:00 committed by GitHub
commit 3d423d25f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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({