mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
Allow any file to be used for RAG.
Changed RAG parser to prefer file extensions over MIME content types. If the type of file is not recognized assume it's a text file.
This commit is contained in:
@@ -173,7 +173,8 @@
|
||||
) {
|
||||
uploadDoc(file);
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
}
|
||||
} else {
|
||||
toast.error(`File not found.`);
|
||||
@@ -308,8 +309,9 @@
|
||||
uploadDoc(file);
|
||||
filesInputElement.value = '';
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
inputFiles = null;
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
filesInputElement.value = '';
|
||||
}
|
||||
} else {
|
||||
toast.error(`File not found.`);
|
||||
|
||||
@@ -73,7 +73,8 @@
|
||||
) {
|
||||
uploadDoc(file);
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
}
|
||||
} else {
|
||||
toast.error(`File not found.`);
|
||||
@@ -153,7 +154,8 @@
|
||||
) {
|
||||
uploadDoc(file);
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
}
|
||||
|
||||
inputFiles = null;
|
||||
|
||||
Reference in New Issue
Block a user