diff --git a/unstructured/ingest/v2/processes/connectors/fsspec/fsspec.py b/unstructured/ingest/v2/processes/connectors/fsspec/fsspec.py index 3a1a76ca9b..2adfa99b03 100644 --- a/unstructured/ingest/v2/processes/connectors/fsspec/fsspec.py +++ b/unstructured/ingest/v2/processes/connectors/fsspec/fsspec.py @@ -187,6 +187,9 @@ def get_metadata(self, path: str) -> DataSourceMetadata: "protocol": self.index_config.protocol, "remote_file_path": self.index_config.remote_url, } + file_stat = self.fs.stat(path=path) + if file_id := file_stat.get("id"): + record_locator["file_id"] = file_id if metadata: record_locator["metadata"] = metadata return DataSourceMetadata(