(fix:ingestion) store file name as metadata, not path

This commit is contained in:
ManishMadan2882
2025-05-09 02:26:35 +05:30
parent d073947f3b
commit e1aa2cc0b8

View File

@@ -158,7 +158,7 @@ class SimpleDirectoryReader(BaseReader):
data = f.read()
# Prepare metadata for this file
if self.file_metadata is not None:
file_metadata = self.file_metadata(str(input_file))
file_metadata = self.file_metadata(input_file.name)
else:
# Provide a default empty metadata
file_metadata = {'title': '', 'store': ''}