Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

issue 341_Update __init__.py (#344)

wenzhuo zhand0ff779d3fee
diff --git a/api/apps/__init__.py b/api/apps/__init__.py
index 5ee940f462..fcd39592d5 100644
--- a/api/apps/__init__.py
+++ b/api/apps/__init__.py
@@ -15,6 +15,7 @@
#
import logging
import sys
+import os
from importlib.util import module_from_spec, spec_from_file_location
from pathlib import Path
from flask import Blueprint, Flask, request
@@ -53,8 +54,8 @@ app.errorhandler(Exception)(server_error_response)
#app.config["LOGIN_DISABLED"] = True
app.config["SESSION_PERMANENT"] = False
app.config["SESSION_TYPE"] = "filesystem"
-app.config['MAX_CONTENT_LENGTH'] = 128 * 1024 * 1024
-
+#app.config['MAX_CONTENT_LENGTH'] = 128 * 1024 * 1024
+app.config['MAX_CONTENT_LENGTH'] = os.environ.get("MAX_CONTENT_LENGTH", 128 * 1024 * 1024)
Session(app)
login_manager = LoginManager()
login_manager.init_app(app)
@@ -116,4 +117,4 @@ def load_user(web_request):
@app.teardown_request
def _db_close(exc):
- close_connection()
\ No newline at end of file
+ close_connection()