[GH-ISSUE #19810] feat: Apply document upload limits of chats also to folders #57671

Closed
opened 2026-05-05 21:21:24 -05:00 by GiteaMirror · 13 comments
Owner

Originally created by @Ithanil on GitHub (Dec 8, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19810

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

Currently, the existing Max Upload Count / Size limits only apply when uploading files directly to chats. The same limits do not apply when creating folders and uploading files there to be used by chats.
Because uploading files to folders basically serves as a default setup for contained chats, applying the same chat limits to folders would be logical. Also, if an admin chose to limit uploads for chats he likely wants to limit it for folders as well.

Desired Solution you'd like

Simply apply the Max Upload Size / Count settings to folders, just as they are applied to chats. I.e. creating the folder fails with an error message (ideally without closing the window and forcing the user to re-iterate, but that's optional).

Alternatives Considered

No response

Additional Context

No response

Originally created by @Ithanil on GitHub (Dec 8, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/19810 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description Currently, the existing Max Upload Count / Size limits only apply when uploading files directly to chats. The same limits do not apply when creating folders and uploading files there to be used by chats. Because uploading files to folders basically serves as a default setup for contained chats, applying the same chat limits to folders would be logical. Also, if an admin chose to limit uploads for chats he likely wants to limit it for folders as well. ### Desired Solution you'd like Simply apply the Max Upload Size / Count settings to folders, just as they are applied to chats. I.e. creating the folder fails with an error message (ideally without closing the window and forcing the user to re-iterate, but that's optional). ### Alternatives Considered _No response_ ### Additional Context _No response_
GiteaMirror added the enhancement label 2026-05-05 21:21:24 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Dec 8, 2025):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #533 Uploading and Embedding Folders
    by mafrasiabi • Jan 19, 2024

  2. #14596 feat: Allow file upload when editing a previous chat message
    by riendril • Jun 02, 2025

  3. #13275 feat: Ability to remove attached files in chat
    by mjp0 • Apr 28, 2025


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3625375888 --> @owui-terminator[bot] commented on GitHub (Dec 8, 2025): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#533](https://github.com/open-webui/open-webui/issues/533) **Uploading and Embedding Folders** *by mafrasiabi • Jan 19, 2024* 2. [#14596](https://github.com/open-webui/open-webui/issues/14596) **feat: Allow file upload when editing a previous chat message** *by riendril • Jun 02, 2025* 3. [#13275](https://github.com/open-webui/open-webui/issues/13275) **feat: Ability to remove attached files in chat** *by mjp0 • Apr 28, 2025* --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@Ithanil commented on GitHub (Dec 12, 2025):

@Classic298 Any insights on whether this is going to be changed (as proposed)? If the given proposal is acceptable, I can also work on a PR myself.

<!-- gh-comment-id:3645828868 --> @Ithanil commented on GitHub (Dec 12, 2025): @Classic298 Any insights on whether this is going to be changed (as proposed)? If the given proposal is acceptable, I can also work on a PR myself.
Author
Owner

@Classic298 commented on GitHub (Dec 12, 2025):

@Ithanil sorry this is beyond what i feel comfortable deciding.

me personally? i think it should be implemented, yes.

but it's beyond what i think is in my scope to decide so we'll have to ask @tjbck here.

<!-- gh-comment-id:3646209745 --> @Classic298 commented on GitHub (Dec 12, 2025): @Ithanil sorry this is beyond what i feel comfortable deciding. me personally? i think it should be implemented, yes. but it's beyond what i think is in my scope to decide so we'll have to ask @tjbck here.
Author
Owner

@ShirasawaSama commented on GitHub (Dec 30, 2025):

Caused by #15898 9f5c905592

<!-- gh-comment-id:3698515117 --> @ShirasawaSama commented on GitHub (Dec 30, 2025): Caused by #15898 https://github.com/open-webui/open-webui/commit/9f5c90559272c024dd408b934736463269215a4f
Author
Owner

@ShirasawaSama commented on GitHub (Dec 30, 2025):

We encountered this issue today as well.

One of our users uploaded a complete Node.js project folder to the knowledge base, which included the node_modules directory containing hundreds of thousands of files. It nearly maxed out our server's network bandwidth. 😂

Image

Then our servers started generating a flood of alerts, jolting me awake from my sleep. 😭

We then immediately banned this user and contacted them directly by phone to inquire about the reason: they wanted to use the knowledge base to analyze code. We informed them that we currently do not support this functionality and suggested that uploading a ZIP file might be a better alternative.

Image
<!-- gh-comment-id:3698520567 --> @ShirasawaSama commented on GitHub (Dec 30, 2025): We encountered this issue today as well. One of our users uploaded a **complete Node.js project** folder to the knowledge base, which included the `node_modules` directory containing **hundreds of thousands of files**. It nearly maxed out our server's network bandwidth. 😂 <img width="698" height="368" alt="Image" src="https://github.com/user-attachments/assets/0a9f7e74-36dd-48ba-8dbc-86fddece6d3e" /> > _Then our servers started generating a flood of alerts, jolting me awake from my sleep._ 😭 We then immediately banned this user and contacted them directly by phone to inquire about the reason: they wanted to use the knowledge base to analyze code. We informed them that we currently do not support this functionality and suggested that uploading a ZIP file might be a better alternative. <img width="3470" height="236" alt="Image" src="https://github.com/user-attachments/assets/3f17ee86-a9d0-4346-826f-ad11c07117db" />
Author
Owner

@Classic298 commented on GitHub (Dec 30, 2025):

We should use this issue to also discuss this for knowledge base limits (num of files, file size, and knowledge base size) cc @ShirasawaSama

<!-- gh-comment-id:3699182511 --> @Classic298 commented on GitHub (Dec 30, 2025): We should use this issue to also discuss this for knowledge base limits (num of files, file size, and knowledge base size) cc @ShirasawaSama
Author
Owner

@Classic298 commented on GitHub (Dec 30, 2025):

and we should come up with a proper solution, like, logically speaking

if we introduce limits for folders and knowledgebases, should they be the same as for individual chat uploads like they already exist?

what if we reuse them?
what if you configure a file amount limit of 10 and a user uploads 10 files to a folder and then starts a chat inside the folder and uploads an additional 10 files to that chat? should that be allowed?

what is the consensus here do you guys think?

CC @Ithanil

<!-- gh-comment-id:3699186071 --> @Classic298 commented on GitHub (Dec 30, 2025): and we should come up with a proper solution, like, logically speaking if we introduce limits for folders and knowledgebases, should they be the same as for individual chat uploads like they already exist? what if we reuse them? what if you configure a file amount limit of 10 and a user uploads 10 files to a folder and then starts a chat inside the folder and uploads an additional 10 files to that chat? should that be allowed? what is the consensus here do you guys think? CC @Ithanil
Author
Owner

@ShirasawaSama commented on GitHub (Dec 31, 2025):

I strongly recommend separating the file upload limit in regular chats from the file folder upload limit in the knowledge base.

In regular chats, RAG can be bypassed, but it is enforced in the knowledge base.

<!-- gh-comment-id:3701832936 --> @ShirasawaSama commented on GitHub (Dec 31, 2025): I strongly recommend separating the file upload limit in regular chats from the file folder upload limit in the knowledge base. In regular chats, RAG can be bypassed, but it is enforced in the knowledge base.
Author
Owner

@Ithanil commented on GitHub (Dec 31, 2025):

I strongly recommend separating the file upload limit in regular chats from the file folder upload limit in the knowledge base.

In regular chats, RAG can be bypassed, but it is enforced in the knowledge base.

Agree, but I want to make clear that I didn't originally talk about knowledge bases in this issue. I mean the chat folders, for which IMO applying the same limits as for chats would make sense.

<!-- gh-comment-id:3701846745 --> @Ithanil commented on GitHub (Dec 31, 2025): > I strongly recommend separating the file upload limit in regular chats from the file folder upload limit in the knowledge base. > > In regular chats, RAG can be bypassed, but it is enforced in the knowledge base. Agree, but I want to make clear that I didn't originally talk about knowledge bases in this issue. I mean the chat folders, for which IMO applying the same limits as for chats would make sense.
Author
Owner

@Ithanil commented on GitHub (Dec 31, 2025):

and we should come up with a proper solution, like, logically speaking

if we introduce limits for folders and knowledgebases, should they be the same as for individual chat uploads like they already exist?

what if we reuse them? what if you configure a file amount limit of 10 and a user uploads 10 files to a folder and then starts a chat inside the folder and uploads an additional 10 files to that chat? should that be allowed?

what is the consensus here do you guys think?

CC @Ithanil

So, given that we keep a basic file size/count kind of limitation, my idea would be the following:

  1. Use a global per-file size limit, because I think the main purpose here is to "protect" the document extraction engine (which is configured globally) as well as to play well with configured max body sizes. Also, it then serves as an anchor to determine the maximum amount of data stored in a given number of files.

  2. Use the same file count limit for folders and chats

Because uploading files to folders basically serves as a default setup for contained chats, applying the same chat limits to folders would be logical.

If that limit is already reached due to the folder setup, IMO it should not be possible to add more files in a chat in that folder.

  1. Use a separate file count limit for knowledge bases.

That would be my suggestion for a quick "fix" with the current system. Ultimately however, it would be desirable to have a quota for the total amount of data currently stored in the system by a single user. And I think that would concern both the storage consumed by the files as well as the number of chunks in the vector store.

<!-- gh-comment-id:3702930883 --> @Ithanil commented on GitHub (Dec 31, 2025): > and we should come up with a proper solution, like, logically speaking > > if we introduce limits for folders and knowledgebases, should they be the same as for individual chat uploads like they already exist? > > what if we reuse them? what if you configure a file amount limit of 10 and a user uploads 10 files to a folder and then starts a chat inside the folder and uploads an additional 10 files to that chat? should that be allowed? > > what is the consensus here do you guys think? > > CC [@Ithanil](https://github.com/Ithanil) So, given that we keep a basic file size/count kind of limitation, my idea would be the following: 1) Use a global per-file size limit, because I think the main purpose here is to "protect" the document extraction engine (which is configured globally) as well as to play well with configured max body sizes. Also, it then serves as an anchor to determine the maximum amount of data stored in a given number of files. 2) Use the same file count limit for folders and chats >Because uploading files to folders basically serves as a default setup for contained chats, applying the same chat limits to folders would be logical. If that limit is already reached due to the folder setup, IMO it should not be possible to add more files in a chat in that folder. 3) Use a separate file count limit for knowledge bases. That would be my suggestion for a quick "fix" with the current system. Ultimately however, it would be desirable to have a quota for the **total** amount of data currently stored in the system by a single user. And I think that would concern both the storage consumed by the files as well as the number of chunks in the vector store.
Author
Owner

@tjbck commented on GitHub (Jan 1, 2026):

FOLDER_MAX_FILE_COUNT introduced in dev!

<!-- gh-comment-id:3703502091 --> @tjbck commented on GitHub (Jan 1, 2026): `FOLDER_MAX_FILE_COUNT` introduced in dev!
Author
Owner

@ramidahbash commented on GitHub (Jan 20, 2026):

What does the new FOLDER_MAX_FILE_COUNT specify exactly? is it the number of files that can be in a single knowledge? is it the max amount of files a user can upload to a knowledge at a time? is it both? or is it something else completely?

Thanks for the response

<!-- gh-comment-id:3772604766 --> @ramidahbash commented on GitHub (Jan 20, 2026): What does the new FOLDER_MAX_FILE_COUNT specify exactly? is it the number of files that can be in a single knowledge? is it the max amount of files a user can upload to a knowledge at a time? is it both? or is it something else completely? Thanks for the response
Author
Owner

@Classic298 commented on GitHub (Jan 20, 2026):

@ramidahbash PLEASE read the docs

https://docs.openwebui.com/getting-started/env-configuration#folder_max_file_count

https://docs.openwebui.com/troubleshooting/rag/#6-upload-limits-and-restrictions-
"This limit applies to the number of files directly associated with a folder."

<!-- gh-comment-id:3772629026 --> @Classic298 commented on GitHub (Jan 20, 2026): @ramidahbash PLEASE read the docs https://docs.openwebui.com/getting-started/env-configuration#folder_max_file_count https://docs.openwebui.com/troubleshooting/rag/#6-upload-limits-and-restrictions- "This limit applies to the number of files directly associated with a folder."
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57671