Merge pull request #4917 from Yanyutin753/upload_files_limit
🤖 Limit the size and number of uploaded files
This commit is contained in:
@@ -542,6 +542,16 @@
|
||||
`Oops! Hold tight! Your files are still in the processing oven. We're cooking them up to perfection. Please be patient and we'll let you know once they're ready.`
|
||||
)
|
||||
);
|
||||
} else if (
|
||||
($config?.file?.max_count ?? null) !== null &&
|
||||
files.length + chatFiles.length > $config?.file?.max_count
|
||||
) {
|
||||
console.log(chatFiles.length, files.length);
|
||||
toast.error(
|
||||
$i18n.t(`You can only chat with a maximum of {{maxCount}} file(s) at a time.`, {
|
||||
maxCount: $config?.file?.max_count
|
||||
})
|
||||
);
|
||||
} else {
|
||||
// Reset chat input textarea
|
||||
const chatTextAreaElement = document.getElementById('chat-textarea');
|
||||
|
||||
Reference in New Issue
Block a user