[FIX] web: increase file upload to 128Mb

Also make this a configurable value, from the server.

This is the limit of the SAAS servers.

closes odoo/odoo#72143

X-original-commit: bcd1c8aade6123dd20d7aebaae8a0f204f258604
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
wan
2021-06-14 15:51:24 +00:00
committed by william-andre
parent dfe699efe9
commit d29c8427d1
2 changed files with 7 additions and 1 deletions
@@ -1856,7 +1856,7 @@ var AbstractFieldBinary = AbstractField.extend({
this._super.apply(this, arguments);
this.fields = record.fields;
this.useFileAPI = !!window.FileReader;
this.max_upload_size = 64 * 1024 * 1024; // 64Mo
this.max_upload_size = session.max_file_upload_size || 128 * 1024 * 1024;
this.accepted_file_extensions = (this.nodeOptions && this.nodeOptions.accepted_file_extensions) || this.accepted_file_extensions || '*';
if (!this.useFileAPI) {
var self = this;