Skip to content

Commit de050c8

Browse files
committed
k
1 parent f6d8f5c commit de050c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/danswer/connectors/file/connector.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,13 @@ def _process_file(
123123
"filename",
124124
"file_display_name",
125125
"title",
126+
"connector_type",
126127
]
127128
}
128129

130+
source_type_str = all_metadata.get("connector_type")
131+
source_type = DocumentSource(source_type_str) if source_type_str else None
132+
129133
p_owner_names = all_metadata.get("primary_owners")
130134
s_owner_names = all_metadata.get("secondary_owners")
131135
p_owners = (
@@ -145,7 +149,7 @@ def _process_file(
145149
sections=[
146150
Section(link=all_metadata.get("link"), text=file_content_raw.strip())
147151
],
148-
source=DocumentSource.FILE,
152+
source=source_type or DocumentSource.FILE,
149153
semantic_identifier=file_display_name,
150154
title=title,
151155
doc_updated_at=final_time_updated,

0 commit comments

Comments
 (0)