mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-23 20:03:29 -05:00
fix: file upload encoding issue
This commit is contained in:
1 parent
51ef5cfa45
commit
91efd6cb63
1 file changed
+2
-2
@@ -400,9 +400,9 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
|
||||
elif file_ext in known_source_ext or (
|
||||
file_content_type and file_content_type.find("text/") >= 0
|
||||
):
|
||||
loader = TextLoader(file_path)
|
||||
loader = TextLoader(file_path, autodetect_encoding=True)
|
||||
else:
|
||||
loader = TextLoader(file_path)
|
||||
loader = TextLoader(file_path, autodetect_encoding=True)
|
||||
known_type = False
|
||||
|
||||
return loader, known_type
|
||||
|
||||
Reference in new issue
Block a user