diff --git a/backend/danswer/connectors/file/connector.py b/backend/danswer/connectors/file/connector.py index 13744f02b..b26335482 100644 --- a/backend/danswer/connectors/file/connector.py +++ b/backend/danswer/connectors/file/connector.py @@ -123,9 +123,13 @@ def _process_file( "filename", "file_display_name", "title", + "connector_type", ] } + source_type_str = all_metadata.get("connector_type") + source_type = DocumentSource(source_type_str) if source_type_str else None + p_owner_names = all_metadata.get("primary_owners") s_owner_names = all_metadata.get("secondary_owners") p_owners = ( @@ -145,7 +149,7 @@ def _process_file( sections=[ Section(link=all_metadata.get("link"), text=file_content_raw.strip()) ], - source=DocumentSource.FILE, + source=source_type or DocumentSource.FILE, semantic_identifier=file_display_name, title=title, doc_updated_at=final_time_updated,