refactor: Limit file size of uploads by setting max_content_length

This commit is contained in:
Mitul David 2021-11-17 16:26:00 +05:30
parent 7aa578d992
commit 648d24eca5

View file

@ -120,6 +120,8 @@ def init_request(request):
else:
frappe.connect(set_admin_as_user=False)
request.max_content_length = frappe.local.conf.get('max_file_size') or 10 * 1024 * 1024
make_form_dict(request)
if request.method != "OPTIONS":