refactored note attachment into note ancillary

This commit is contained in:
zadam
2023-01-28 13:13:46 +01:00
parent 78954268ab
commit 37ba76fdd8
30 changed files with 212 additions and 211 deletions

View File

@@ -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
};
};