Skip to Content
Menu
This question has been flagged
1 Reply
10174 Views

We're working on a relatively e-commerce big project and meanwhile the gzipped dump has already grown beyond 450M. I also suspect that things are a bit slow because of all the images stored in the database. How can we move them to the file system? Is there a module for that? If not, how can I start writing one?

 

One line: we want to store your files in a filestore in place of in the postgreSQL database that Odoo uses.

Avatar
Discard

i would like a solution to this as well. It would be much quicker to upload our images. This would enable us to sort them in a sensible fashion also. Currently all the images are in the same place. I would like to place images for the shop in a separate directory, and the same for the various blog posts / image galeries etc. I've read elsewhere that this should be in the configuration options, but I haven't got this option in my server install.

Best Answer

if I understand this correctly you want to store your files in a filestore in place of in the postgreSQL database that Odoo uses?

If you setup ir_attachment.location (settings > Technical > Parameters > System parameters) to file:///filestore you should have a new filestore folder that has the name of the database you setup in youropenobject-server/openerp/filestore folder.
The parameter would look like this:

  • If your database is demo_test you will haveopenobject-server/openerp/filestore/demo_test folder.

Note: OpenERP server should be able to write on this directory: openobject-server/openerp/ . Setup write acces (sudo chmod 755 on Ubuntu) and user used to launch OpenERP server service correctly.
The filestore folder should be in the same level as service, tools, osv, cli, conf etc .. in the openerp folder of the server (not web or addons)

If the filestore does not exist, create it and give the write access to openerp (sudo chmod 755 on Ubuntu). When you launch OpenERP you should have a warning or an error if OpenERP can't create folder.

Note:
The 'filestore' directory will not be created until the first document is attached within OpenERP

And more information can be found here: https://www.odoo.com/forum/help-1/question/where-are-document-attachments-stored-529

Avatar
Discard

Hi Yenthe,

I could not find the ir_attachment.localtion in odoo 10, how can i store my files in a filesystem instead of the db in odoo 10. Thanks