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://")