How to upload large file size (more than 200MB)

Dear All,
I tried to upload large file size on ERP but it always say that “Size exceeds the maximum allowed file size.” Although, I already setup max_file_size in site_config.json to larger value.
image
Thanks
Dharma

Follow the below steps to achieve that:
Before doing that make sure you are in the bench directory.

$ bench set-config max_file_size 524288000
$ sudo nano config/nginx.conf

Inside nginx.conf file find “client_max_body_size 50m;” and replace with “client_max_body_size 500m;”

Then restart your nginx server,

$ sudo service nginx restart
6 Likes

i have exactly used this cmd, but in the site config the value has inserted as string, need to remove the double quotation to make it integer.

Since the default upload_file endpoint doesn’t support chunked file uploads, the uploaded file is kept in memory until the file is saved on disk.

Setting high max_file_size values makes your sites susceptible to DOS attacks.


A good solution would be to use external services instead. eg: Frappe Cloud uploads files directly to S3 from the Dashboard client when prompting users to upload backups.

Check code from Frappe Drive. drive/drive/api/files.py at 090eea4254d1b7ea59cb2a62cba61c7cbbcc0959 · frappe/drive · GitHub

It supports large file upload drive/README.md at main · frappe/drive · GitHub