diff --git a/frappe/app.py b/frappe/app.py index 9ed084742e..0284968113 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -184,7 +184,7 @@ def init_request(request): request.max_content_length = get_max_file_size() else: - request.max_content_length = cint(frappe.local.conf.get("max_file_size")) or 10 * 1024 * 1024 + request.max_content_length = cint(frappe.local.conf.get("max_file_size")) or 25 * 1024 * 1024 make_form_dict(request) if request.method != "OPTIONS": diff --git a/frappe/boot.py b/frappe/boot.py index c36927637a..2ce950a55a 100644 --- a/frappe/boot.py +++ b/frappe/boot.py @@ -122,12 +122,12 @@ def get_letter_heads(): def load_conf_settings(bootinfo): - from frappe import conf + from frappe.core.api.file import get_max_file_size - bootinfo.max_file_size = conf.get("max_file_size") or 10485760 + bootinfo.max_file_size = get_max_file_size() for key in ("developer_mode", "socketio_port", "file_watcher_port"): - if key in conf: - bootinfo[key] = conf.get(key) + if key in frappe.conf: + bootinfo[key] = frappe.conf.get(key) def load_desktop_data(bootinfo):