We are using Odoo 18 Enterprise on Odoo.sh. We have a Proof menu where users upload a PDF file. The field used for this upload is a Binary field.
When we upload the PDF and try to save the record, we encounter the error shown below.
I checked existing answers on the Odoo forum, but none of them resolved the issue. I also reviewed the following GitHub issue:
https://github.com/odoo/odoo/issues/212746
This issue has been reported by other users as well, but so far there is no confirmed solution available.
werkzeug.exceptions.RequestEntityTooLarge: 413 Request Entity Too Large: The data value transmitted exceeds the capacity limit.
- I already try this solution but this only work in local machine.
- from odoo import http
- http.DEFAULT_MAX_CONTENT_LENGTH = 1024 * 1024 * 1024 # 1GB
Thanks
What is your actual file size? Is there enough space assigned to your sh instance?
Also, there is a document.max_fileupload_size in System parameters, set to 67MB by default - but I doubt you can tweak it enough from here.
Hello Nikhil,
This issue is not caused by Odoo itself but by request size limits on Odoo.sh. Increasing http.DEFAULT_MAX_CONTENT_LENGTH works only in local environments because Odoo.sh enforces a reverse proxy limit (typically around 25–50MB), which cannot be modified.
Reduce or compress the PDF before uploading. You can also use ir.attachment instead of a Binary field, but keep in mind that large files will still impact storage and database size.
Let's wait if any one has solution for this
Thanks