Community mailing list archives


Re: About Attachment File Location (again)

Anybox, Christophe Combelles
- 04.02.2015 08:02:11
Le 04/02/2015 07:08, Luke Branch a écrit :
<blockquote cite="" type="cite">
Hi All,

I've been working on a project for multiple product images here (WIP):

and it is currently setup to store multiple product images in the database. What are your opinions on moving the image store to the filesystem as an option in the module? I'm concerned the database will suffer performance issues (especially on less powerful hardware setups) once the product catalog + multiple images per product starts to expand.

I have a project that i'm building the module for that will eventually hold around 80,000 products with around 5 - 8 images per product and am wondering whether an image store in the filesystem or database would be the best course of action considering the end goal.

It would be an interesting benchmark to run, but I'm quite confident about postgresql capabilities. Actually much more than the ir.attachment code which I strongly suspect would be the real bottleneck.  In the few tests I've done, I've hardly seen any difference between Filestore, Bytea and Large Objects. But that would need more thorough tests.

<blockquote cite="" type="cite">

Does anyone have any suggestions regarding where to learn about using Odoo's built-in caching system for caching images that are stored in the filesystem/database as well? I'm wondering whether an Odoo + Nginx + (possibly) Varnish setup would be best in this case, or whether Odoo's built-in caching system has the features I need for this.

Yes, you should ensure that a caching server such as Varnish or Nginx will do the job and don't  disturb neither the database nor the odoo server at all. In that case you can store attachments wherever you like, there are no differences.
For the internal caching of odoo I don't remember, but the better place to learn more is the code.


<blockquote cite="" type="cite">



On Sat, Jan 31, 2015 at 8:12 PM, Antony Lesuisse <> wrote:
Attachment are stored oustide the database by default in v8 in


They are named as sha1 hash (almost like git objetcs).

Under Linux or any other freedesktop compliant distribution the data is 
$HOME/.local/Odoo and can be override with --data-dir=

This  question is still relevant the only difference is that we enabled it by 
default in v8.

For ftp access i recommend that you use the document_fs

If sync back from ftp to ir.attachment you need to execute _document_fs_sync 
from a cron job or as post logout script from the ftp server.

Forum questions:

On 01/31/2015 04:47 AM, Togar Hutabarat wrote:
> Hello Community!
> Maybe many question similar with my question has been asked by a many people
> in forums or Stackoverflow. But please allow me to ask again in this community
> forum. My question: is there any possibility for Odoo to save attachment
> directly into a file system directory (instead of database)?
> Another doubt about this: I know that we can configure FTP for Odoo (module
> document_ftp), so we can browse/copy/open attachment by using file explorer
> (Linux/Windows/iOS) or using any FTP client. Is that it really store the file
> into FTP server? Or is Odoo just use FTP as a emulation interface to access
> attachments? What we want is to make sure Odoo not store attachment data into
> database that may increase database size when we upload big files.
> Really appreciate any answer..
> Thanks,
>     *
>     Togar Parnaehan Hutabarat*
>     *Databit - Odoo Partner Indonesia*
>     Email    : <>
>     Mobile   : +62821-3079-8827
>     YM       : <>
>     Skype    : togar.hutabarat
>     Twitter  : @togarhutabarat
> _______________________________________________
> Mailing-List:
> Post to:
> Unsubscribe:

Post to:

Post to: