Minor Improvements for File Validation and Configuration Handling #21179 (#21171)

Co-authored-by: tech <cto@sb>
This commit is contained in:
NeatGuyCoding 2025-06-18 18:33:28 +08:00 • committed by GitHub
commit 2eae7503e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -104,7 +104,7 @@ class QAIndexProcessor(BaseIndexProcessor):
def format_by_template(self, file: FileStorage, **kwargs) -> list[Document]:
# check file type
if not file.filename or not file.filename.endswith(".csv"):
if not file.filename or not file.filename.lower().endswith(".csv"):
raise ValueError("Invalid file type. Only CSV files are allowed")
try: