Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

How to use the filesystem instead of storing images in the database with base64?

By
Kasper Souren
on 9/18/14, 8:52 AM 1,838 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.

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.

David Myers
on 10/24/14, 4:05 AM
1

Yenthe

--Yenthe--
6676
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 10/24/14, 7:27 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)

Stats

Asked: 9/18/14, 8:52 AM
Seen: 1838 times
Last updated: 3/16/15, 8:10 AM