fix: . is missing in file_extension (#8736)

This commit is contained in:
crazywoola 2024-09-25 10:09:20 +08:00 committed by GitHub
parent 68c7e68a8a
commit bf64ff215b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,7 +124,7 @@ class ExtractProcessor:
extractor = UnstructuredPPTXExtractor(file_path, unstructured_api_url)
elif file_extension == ".xml":
extractor = UnstructuredXmlExtractor(file_path, unstructured_api_url)
elif file_extension == "epub":
elif file_extension == ".epub":
extractor = UnstructuredEpubExtractor(file_path, unstructured_api_url)
else:
# txt
@ -146,7 +146,7 @@ class ExtractProcessor:
extractor = WordExtractor(file_path, upload_file.tenant_id, upload_file.created_by)
elif file_extension == ".csv":
extractor = CSVExtractor(file_path, autodetect_encoding=True)
elif file_extension == "epub":
elif file_extension == ".epub":
extractor = UnstructuredEpubExtractor(file_path)
else:
# txt