将Flask初始化时允许的最大文件体积设置为128MB

This commit is contained in:
inori-333
2025-03-03 13:19:17 +08:00
parent d305211a36
commit f4d12e4e5e
+1
View File
@@ -23,6 +23,7 @@ class AstrBotDashboard():
self.config = core_lifecycle.astrbot_config
self.data_path = os.path.abspath(os.path.join(DATAPATH, "dist"))
self.app = Quart("dashboard", static_folder=self.data_path, static_url_path="/")
self.app.config['MAX_CONTENT_LENGTH'] = 128 * 1024 * 1024 # 将Flask允许的最大上传文件体大小设置为128MB
self.app.json.sort_keys = False
self.app.before_request(self.auth_middleware)
# token 用于验证请求