mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 06:45:24 +00:00
refac: max file count behaviour
This commit is contained in:
parent
59324a82e0
commit
d802c718a4
1 changed files with 13 additions and 0 deletions
|
|
@ -307,6 +307,19 @@
|
||||||
|
|
||||||
const inputFilesHandler = async (inputFiles) => {
|
const inputFilesHandler = async (inputFiles) => {
|
||||||
console.log('Input files handler called with:', inputFiles);
|
console.log('Input files handler called with:', inputFiles);
|
||||||
|
|
||||||
|
if (
|
||||||
|
($config?.file?.max_count ?? null) !== null &&
|
||||||
|
files.length + inputFiles.length > $config?.file?.max_count
|
||||||
|
) {
|
||||||
|
toast.error(
|
||||||
|
$i18n.t(`You can only chat with a maximum of {{maxCount}} file(s) at a time.`, {
|
||||||
|
maxCount: $config?.file?.max_count
|
||||||
|
})
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
inputFiles.forEach((file) => {
|
inputFiles.forEach((file) => {
|
||||||
console.log('Processing file:', {
|
console.log('Processing file:', {
|
||||||
name: file.name,
|
name: file.name,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue