Community mailing list archives
Re: Odoo Website - Add filesby
Sorry for the "application/pdf" I pasted it directly from my code, check against the mimetype you need
On Mon, May 18, 2015 at 1:35 PM, Paul Catinean <firstname.lastname@example.org> wrote:
Hi Sebastien,All you have to do is add a "<input type="file" name="file_name"/>" to your view inside a formYou will need a method that receives that through post it will take the form of werkzeug FileStorage object (http://werkzeug.pocoo.org/docs/0.10/datastructures/#werkzeug.datastructures.FileStorage)From there you can check the file.mimetype == 'application/pdf' and store it either in the filesystem or in Odoo database in base64 formatOn Mon, May 18, 2015 at 1:23 PM, Sébastien REUILLER <email@example.com> wrote:Hi all,
I spent a lot of time to find a module that will allow me to add files on my website made with Odoo but I didn't find nothing.
Will there a solution to add (like images) downloadable files to my site?