Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
21562 Lượt xem

Hi. When we are uploading files bigger than 15 MB to Odoo, we get error messages.

How can we change this setting?

Ảnh đại diện
Huỷ bỏ

Posting the error message may help others readers determine if the message is a timeout (likely Ngnix or Apache as Grover suggests) or an actual size restriction.

Câu trả lời hay nhất

Please refer to this forum entry for an answer → https://www.odoo.com/fr_FR/forum/aide-1/upload-size-limit-in-odoo-221095

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

It depends on your configuration.

As I know Odoo doesn't have limitations. If you are behind nginx or Apache you have to set it there.

Ảnh đại diện
Huỷ bỏ

It does have limitations and it is not configurable, as stated by Axel ;)

Câu trả lời hay nhất

What Birol Saglicak is saying is that there is a limit for the upload of files into the binary fields, the limit is 25 mb, not 15 mb, and it's harcoded into the js field widget as:

this.max_upload_size = 25 * 1024 * 1024; // 25Mo

If you wanna change it you have 2 ways, manually change that value in the js file at: /openerp/addons/web/static/src/js/views/form_widgets.js (line 1137 in my Odoo Community copy)

or you could load a js extension of the widgets FieldBinaryFile and FieldBinaryImage in your custom module to change that since you will not be able to get access to the widget FieldBinary where it's defined using an extension and the you need to change all the widgets that extends from FieldBinary , like:


var core = require('web.core');

var FieldBinaryFile = core.form_widget_registry.get('binary');

var FieldBinaryImage = core.form_widget_registry.get('image');

FieldBinaryFile.include({

init: function(field_manager, node) {

this._super(field_manager, node);

this.max_upload_size = 50 * 1024 * 1024; // 50Mo

}

});

FieldBinaryImage.include({

init: function(field_manager, node) {

this._super(field_manager, node);

this.max_upload_size = 50 * 1024 * 1024; // 50Mo

}

});


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 16
4839
1
thg 2 24
1932
0
thg 9 19
4527
1
thg 4 18
12001
0
thg 7 15
3833