mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
refactored note attachment into note ancillary
This commit is contained in:
@@ -96,7 +96,7 @@ async function extractTextFromPdf(note, buffer) {
|
||||
|
||||
strings = strings.filter(str => str?.trim());
|
||||
|
||||
note.saveNoteAttachment('plainText', 'text/plain', strings.join(" "));
|
||||
note.saveNoteAncillary('plainText', 'text/plain', strings.join(" "));
|
||||
}
|
||||
catch (e) {
|
||||
log.info(`Extracting text from PDF on note '${note.noteId}' failed with error '${e.message}', stack ${e.stack}`);
|
||||
@@ -126,4 +126,4 @@ async function ocrTextFromBuffer(buffer) {
|
||||
module.exports = {
|
||||
ocrTextFromBuffer,
|
||||
extractTextFromPdf
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user