mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-28 04:49:21 +02:00
PDF Encrypted Case (#2764)
This commit is contained in:
@@ -208,8 +208,9 @@ def read_pdf_file(
|
|||||||
# By user request, keep files that are unreadable just so they
|
# By user request, keep files that are unreadable just so they
|
||||||
# can be discoverable by title.
|
# can be discoverable by title.
|
||||||
return "", metadata
|
return "", metadata
|
||||||
else:
|
elif pdf_reader.is_encrypted:
|
||||||
logger.warning("No Password available to to decrypt pdf")
|
logger.warning("No Password available to to decrypt pdf, returning empty")
|
||||||
|
return "", metadata
|
||||||
|
|
||||||
# Extract metadata from the PDF, removing leading '/' from keys if present
|
# Extract metadata from the PDF, removing leading '/' from keys if present
|
||||||
# This standardizes the metadata keys for consistency
|
# This standardizes the metadata keys for consistency
|
||||||
|
Reference in New Issue
Block a user