fix: disallow empty files

This commit is contained in:
JoeyShapiro committed 2024-10-10 15:33:27 -05:00
1 parent ad31bd51fd
commit df824db042
2 files changed
+11

No files matched your search

@@ -115,6 +115,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