Skip to Content
Menu
This question has been flagged

What is the upload size limit of a document I want to import in the Document application, website, or as an attachment?

How much data can I import?

Size limit for one document and for the total amount that can be stored in the database?

Avatar
Discard

Great sharing!

Author Best Answer

The upload size limit for one document depends if your database is hosted on Odoo SAAS or SH.

On Saas

  •  The maximum upload size is 64MiB(Mebibytes) which cannot be increased (limitation of Nginx web server). Whether you upload it in the Website application, the Document application, or as an attachment.


On SH

  • Upload limit on the Website is 256MiB which cannot be increased
  • Upload limit on the Document application is 64MiB (67 000 000 bytes actually) which can be increased in system parameters up to 256MiB 
  • Upload limit of attachments (which means any other apps) is 128MiB which cannot be increased

FYI: 64 MiB (Mebibytes) = 67.1089 MB (Megabytes)


Size limit for the database

On Saas

  • There is no limit on the amount of storage you have on the Saas databases

On SH

  • The limit depends on your contract and you can take from 0 to 512Gib ($0.20/GB/month) if you want more than that you need your own dedicated server ($480.00/month).


To limit upload size limit on website, you can use the following configuration,


Avatar
Discard

And what if it is on premise? I would like to upload 4 Giga file.

Author

There are two places where file size limits are set in Odoo:

On the client side, in JavaScript, the limit is 128MB.
On the server side, it can be configured with nginx on the machine.

The JavaScript side limit is mainly for user-friendly error messages. If we only set the server-side limit without a JavaScript limit, uploading a file exceeding the limit would result in no error messages at all. It would seem like the upload is proceeding until the end, but then there would be no confirmation or error message. That's why there's this JS limit: to provide a clearer error message about why the upload failed.

On the server side, in NGINX, you can set a higher upload limit (for example, 4GB):

server {
# other server configurations...

client_max_body_size 4G; # Set the maximum upload size to 4 gigabytes

# other server configurations...
}
On the client side, you need to create a system parameter "web.max_file_upload_size" and set it to 4 * 1024 * 1024 * 1024.

Best Answer

Hi Pierre

I saw your answer. Thank you. Where would I set this when we are hosting our own application.

Thank you

Avatar
Discard
Best Answer

For on-premise configurations:

You can update Settings > Technical > System Parameters​:

document.max_fileupload_size​ for files uploaded to the Documents App

and web.max_file_upload_size​ for other web-related HTTP requests.

The values should be in bytes, for example: 4 * 1024 * 1024 * 1024​ = 4GB

As was mentioned, you may face other timeouts from your reverse proxy.

Avatar
Discard
Related Posts Replies Views Activity
0
Feb 19
4008
2
Oct 24
3069
1
Oct 24
702
0
Mar 24
11800
4
Jul 24
14044