Skip to Content

Contributors

Re: Module for uploading multiple images/attachments to website

Thanx for info. What I wanted to achieve was to somehow upload batch of images 
into website so they could be used in HTML of blog posts we are migrating from 
old site. Or generally have the option in Media selection dialog in web editor 
to upload  a batch of images. However I found that this would be rather 
complicated because the URL of those images would be something like /web/
image/107007/image.png The number is generated so not much of a prediction 
where it'd go. 

I solved it in another way. I create a simple module that only contains 
static/src/img directory with all the images from original blog. That way it 
was easy to update the HTML content to point to these as the path would be 
fixed to /module_name/static/src/img/

Still I think it would be beneficial if it was possible to upload media in 
batch into website editor to be used later because now you have to upload them 
one by one.

S pozdravom

	Radovan Skolnik

On streda 14. októbra 2020 10:32:23 CEST Daniel Reis wrote:

> For a one time load you could use a single use module with an XML

> data file.

> XML data files are capable of importing directly from files.

> Example:

> https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/data/res_partner_dem

> o.xml#L54 [1]

> 

> You would need to script the XML generation from a directory

> containing the files to import.

> 

> --dr

> 

> 

> On 14/10/2020 08:32, Peter Hahn wrote:

> 

> If I got you right you are asking for a one-time import job for

> migration, not for a front end based user friendly solution, right?

> 

> 

> _______________________________________________

> Mailing-List: https://odoo-community.org/groups/contributors-15 [2]

> Post to: mailto:contributors@odoo-community.org

> Unsubscribe: https://odoo-community.org/groups?unsubscribe [3]

> 

> 

> 

> [1]

> https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/data/res_partner_de

> mo.xml#L54 [2] https://odoo-community.org/groups/contributors-15

> [3] https://odoo-community.org/groups?unsubscribe





by Radovan Skolnik - 11:21 - 14 Oct 2020

Reference

  • Module for uploading multiple images/attachments to website
    Hello,
    
    we are migrating old site (done in WordPress) into Odoo created site. I am 
    looking for a way to upload and store multiple images for use in the migrated 
    pages/blogs. So far I couldn't find a way to do this but I have a hunch I am 
    missing something here :-) Any help is appreciated. Thank you.
    
    Best regards
    
    	Radovan Skolnik
    
    
    

    by Radovan Skolnik - 10:46 - 28 Sep 2020