From 33ff49e4d112e75d48b3495e4c6734cd2abdad1e Mon Sep 17 00:00:00 2001 From: lucas-aixplain Date: Wed, 6 Nov 2024 20:19:14 -0300 Subject: [PATCH] Fix check_storage_type to not detect folder as a file --- aixplain/factories/file_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aixplain/factories/file_factory.py b/aixplain/factories/file_factory.py index 2085c75d..1a29ac11 100644 --- a/aixplain/factories/file_factory.py +++ b/aixplain/factories/file_factory.py @@ -91,7 +91,7 @@ def check_storage_type(cls, input_link: Any) -> StorageType: Returns: StorageType: URL, TEXT or FILE """ - if os.path.exists(input_link) is True: + if os.path.exists(input_link) is True and os.path.isfile(input_link) is True: return StorageType.FILE elif ( input_link.startswith("s3://")