imbajin commented on code in PR #356:
URL: https://github.com/apache/hugegraph-ai/pull/356#discussion_r3343930999


##########
hugegraph-llm/src/hugegraph_llm/utils/vector_index_utils.py:
##########
@@ -46,10 +74,9 @@ def read_documents(input_file, input_text):
                     text += "\n"
                 texts.append(text)
             elif full_path.endswith(".pdf"):

Review Comment:
   ⚠️ **Normalize upload suffixes before dispatch**
   
   Evidence: `read_documents()` now accepts PDFs only when 
`full_path.endswith(".pdf")` matches exactly; I reproduced that a valid upload 
named `sample.PDF` falls through to `Please input txt, docx, or pdf file.` 
instead of reaching `read_pdf_text()`. Impact: the UI advertises PDF uploads, 
but common uppercase or mixed-case filenames are still rejected in both 
vector-index and graph-extraction paths that share this helper. Please 
normalize the suffix once, for example with `Path(full_path).suffix.lower()`, 
and add a mixed-case PDF regression test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to