mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
Merge pull request #6109 from JoeyShapiro/dev
fix: disallow empty files
This commit is contained in:
@@ -124,6 +124,11 @@
|
||||
itemId: tempItemId
|
||||
};
|
||||
|
||||
if (fileItem.size == 0) {
|
||||
toast.error($i18n.t('File must have content to be uploaded'));
|
||||
return null;
|
||||
}
|
||||
|
||||
knowledge.files = [...(knowledge.files ?? []), fileItem];
|
||||
|
||||
// Check if the file is an audio file and transcribe/convert it to text file
|
||||
|
||||
Reference in New Issue
Block a user