From c344486aa098f6e611c4d656bc7b57419bbdf61b Mon Sep 17 00:00:00 2001
From: KevinHuSh <kevinhu.sh@gmail.com>
Date: Tue, 16 Apr 2024 10:00:52 +0800
Subject: [PATCH] enlarge max file number per user limit (#373)

### What problem does this PR solve?

Issue link:#370

### Type of change

- [x] Refactoring
---
 api/apps/document_app.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api/apps/document_app.py b/api/apps/document_app.py
index 29e1686..033712f 100644
--- a/api/apps/document_app.py
+++ b/api/apps/document_app.py
@@ -57,7 +57,7 @@ def upload():
         if not e:
             return get_data_error_result(
                 retmsg="Can't find this knowledgebase!")
-        if DocumentService.get_doc_count(kb.tenant_id) >= 128:
+        if DocumentService.get_doc_count(kb.tenant_id) >= os.environ.get('MAX_FILE_NUM_PER_USER', 8192):
             return get_data_error_result(
                 retmsg="Exceed the maximum file number of a free user!")
 
-- 
GitLab