Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
91efd6cb
Commit
91efd6cb
authored
Mar 15, 2024
by
Timothy J. Baek
Browse files
fix: file upload encoding issue
parent
51ef5cfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
backend/apps/rag/main.py
backend/apps/rag/main.py
+2
-2
No files found.
backend/apps/rag/main.py
View file @
91efd6cb
...
@@ -400,9 +400,9 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
...
@@ -400,9 +400,9 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
elif
file_ext
in
known_source_ext
or
(
elif
file_ext
in
known_source_ext
or
(
file_content_type
and
file_content_type
.
find
(
"text/"
)
>=
0
file_content_type
and
file_content_type
.
find
(
"text/"
)
>=
0
):
):
loader
=
TextLoader
(
file_path
)
loader
=
TextLoader
(
file_path
,
autodetect_encoding
=
True
)
else
:
else
:
loader
=
TextLoader
(
file_path
)
loader
=
TextLoader
(
file_path
,
autodetect_encoding
=
True
)
known_type
=
False
known_type
=
False
return
loader
,
known_type
return
loader
,
known_type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment