File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
backend/onyx/server/documents Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1988,18 +1988,13 @@ def should_process_file(file_path: str) -> bool:
1988
1988
if file .content_type == "application/vnd.oasis.opendocument.text" or (
1989
1989
file .filename and file .filename .lower ().endswith ('.odt' )
1990
1990
):
1991
- extracted_text = convert_odt_to_txt (file .file ) # Define this helper; see below
1992
- text_file_id = file_store .save_file (
1993
- content = io .BytesIO (extracted_text .encode ()),
1994
- display_name = file .filename ,
1995
- file_origin = file_origin ,
1996
- file_type = "text/plain" ,
1997
- )
1991
+ text_file_id = convert_odt_to_txt (file , file_store )
1998
1992
deduped_file_paths .append (text_file_id )
1999
1993
deduped_file_names .append (file .filename )
2000
1994
continue
2001
1995
2002
1996
1997
+
2003
1998
# Special handling for doc files - only store the plaintext version
2004
1999
file_type = mime_type_to_chat_file_type (file .content_type )
2005
2000
if file_type == ChatFileType .DOC :
You can’t perform that action at this time.
0 commit comments