refactor(api): switch to dify_config in controllers/console (#6485)

This commit is contained in:
Shoya SHIRAKI
2024-07-21 02:11:40 +09:00
committed by GitHub
parent f73a3a58ae
commit c57b3931d5
10 changed files with 38 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
from flask import current_app
from flask_restful import fields, marshal_with
from configs import dify_config
from controllers.console import api
from controllers.console.app.error import AppUnavailableError
from controllers.console.explore.wraps import InstalledAppResource
@@ -78,7 +78,7 @@ class AppParameterApi(InstalledAppResource):
"transfer_methods": ["remote_url", "local_file"]
}}),
'system_parameters': {
'image_file_size_limit': current_app.config.get('UPLOAD_IMAGE_FILE_SIZE_LIMIT')
'image_file_size_limit': dify_config.UPLOAD_IMAGE_FILE_SIZE_LIMIT
}
}