mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-25 05:54:29 +00:00
Adds optional per-group (and global default) limits on the number of
files and maximum file size for knowledge base uploads, enforced both
in the backend and early in the frontend upload pipeline.
- `WorkspacePermissions` extended with `knowledge_max_count` and
`knowledge_max_size` (nullable int) so the group permissions endpoint
persists and returns these values
- `DEFAULT_PERMISSIONS` in `permissions.ts` gains the two nullable fields
- Group Permissions UI shows numeric inputs for both limits beneath the
Knowledge Access toggle (0 / empty = unlimited)
- `combine_permissions` extended to handle integer-valued permissions
using most-permissive semantics (0 = unlimited always wins, otherwise
max across groups)
- New `get_permission_value()` utility mirrors `has_permission` but
returns the raw value (int/bool/None) rather than a boolean
- `/api/config` resolves and exposes `knowledge.max_count` and
`knowledge.max_size` per-user so the frontend can gate uploads before
any processing begins
- `KnowledgeBase.svelte` and `Models/Knowledge.svelte` check limits
before calling `uploadFile`, preventing unnecessary text-extraction
work on oversized files
- Backend enforces limits in both `/{id}/file/add` and
`/{id}/files/batch/add`; admins always bypass
|
||
|---|---|---|
| .. | ||
| access_grants.py | ||
| auths.py | ||
| automations.py | ||
| calendar.py | ||
| channels.py | ||
| chat_messages.py | ||
| chats.py | ||
| feedbacks.py | ||
| files.py | ||
| folders.py | ||
| functions.py | ||
| groups.py | ||
| knowledge.py | ||
| memories.py | ||
| messages.py | ||
| models.py | ||
| notes.py | ||
| oauth_sessions.py | ||
| prompt_history.py | ||
| prompts.py | ||
| shared_chats.py | ||
| skills.py | ||
| tags.py | ||
| tools.py | ||
| users.py | ||