From 8a5cfa3526ff09d6af247524bcae067ee023d4ca Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 11 Feb 2025 12:14:26 -0300 Subject: [PATCH] fix: make extension check case-insensitive in BaseFileComponent (#6256) fix: Case-insensitive file extension validation in BaseFileComponent Modify file extension validation to use lowercase comparison, ensuring consistent handling of file extensions across different input cases --- src/backend/base/langflow/base/data/base_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/base/data/base_file.py b/src/backend/base/langflow/base/data/base_file.py index 8b9f1ad5b..cd7848e67 100644 --- a/src/backend/base/langflow/base/data/base_file.py +++ b/src/backend/base/langflow/base/data/base_file.py @@ -492,7 +492,7 @@ class BaseFileComponent(Component, ABC): self.log(f"Not a file: {file.path.name}") continue - if file.path.suffix[1:] not in self.valid_extensions: + if file.path.suffix[1:].lower() not in self.valid_extensions: if self.ignore_unsupported_extensions: ignored_files.append(file.path.name) continue