refac/fix: do not process xlsx files with azure doc intelligence

This commit is contained in:
Timothy Jaeryang Baek 2025-09-29 23:05:24 -05:00
parent 8c662c65a9
commit 01a5b97415

View file

@ -346,11 +346,9 @@ class Loader:
self.engine == "document_intelligence" self.engine == "document_intelligence"
and self.kwargs.get("DOCUMENT_INTELLIGENCE_ENDPOINT") != "" and self.kwargs.get("DOCUMENT_INTELLIGENCE_ENDPOINT") != ""
and ( and (
file_ext in ["pdf", "xls", "xlsx", "docx", "ppt", "pptx"] file_ext in ["pdf", "docx", "ppt", "pptx"]
or file_content_type or file_content_type
in [ in [
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-powerpoint", "application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.presentation",