From 45f50ce13cc3bbb7e64630df7fc19cde6ec37afe Mon Sep 17 00:00:00 2001 From: Sean Hatfield <seanhatfield5@gmail.com> Date: Tue, 19 Mar 2024 18:14:34 -0700 Subject: [PATCH] [FIX] Update metadata tags in PDF collector script (#925) update title in pdf collector script to be the filename instead of metadata title --- collector/processSingleFile/convert/asPDF.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collector/processSingleFile/convert/asPDF.js b/collector/processSingleFile/convert/asPDF.js index 560c4939f..e81fe6c76 100644 --- a/collector/processSingleFile/convert/asPDF.js +++ b/collector/processSingleFile/convert/asPDF.js @@ -40,9 +40,9 @@ async function asPDF({ fullFilePath = "", filename = "" }) { const data = { id: v4(), url: "file://" + fullFilePath, - title: docs[0]?.metadata?.pdf?.info?.Title || filename, + title: filename, docAuthor: docs[0]?.metadata?.pdf?.info?.Creator || "no author found", - description: "No description found.", + description: docs[0]?.metadata?.pdf?.info?.Title || "No description found.", docSource: "pdf file uploaded by the user.", chunkSource: "", published: createdDate(fullFilePath), -- GitLab