mirror of
https://github.com/open-webui/open-webui
synced 2025-04-08 22:55:18 +00:00
refac
This commit is contained in:
parent
e0fc3e89a7
commit
6fdfa62845
@ -308,6 +308,7 @@
|
|||||||
|
|
||||||
// Helper function to maintain file paths within zip
|
// Helper function to maintain file paths within zip
|
||||||
const syncDirectoryHandler = async () => {
|
const syncDirectoryHandler = async () => {
|
||||||
|
if ((knowledge?.files ?? []).length > 0) {
|
||||||
const res = await resetKnowledgeById(localStorage.token, id).catch((e) => {
|
const res = await resetKnowledgeById(localStorage.token, id).catch((e) => {
|
||||||
toast.error(e);
|
toast.error(e);
|
||||||
});
|
});
|
||||||
@ -319,6 +320,9 @@
|
|||||||
// Upload directory
|
// Upload directory
|
||||||
uploadDirectoryHandler();
|
uploadDirectoryHandler();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uploadDirectoryHandler();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const addFileHandler = async (fileId) => {
|
const addFileHandler = async (fileId) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user