summaryrefslogtreecommitdiff
path: root/addons/website_slides/controllers
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-08-01 11:20:33 +0000
committerSébastien Theys <seb@odoo.com>2019-08-02 16:47:58 +0000
commit58a2ffa26f1a3b0f9630ce16d11b758d18e20a21 (patch)
treee737f6abdd166c7da94827de9d968ad2d7478dde /addons/website_slides/controllers
parent8206b5b4cc92b6befd98ebec7f7ef8af588a9b68 (diff)
[IMP] *: rename image fields
image_original => image_1920 (now resized to 1920) image_big => image_1024 image_large => image_256 image_medium => image_128 image_small => image_64 image replaced by image_1920 (when writing) or by image_1024 (when displaying what was previously the big size) + add new intermediate format: image_512 PR: #34925
Diffstat (limited to 'addons/website_slides/controllers')
-rw-r--r--addons/website_slides/controllers/main.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py
index d6e1caceb93..2f12ab72775 100644
--- a/addons/website_slides/controllers/main.py
+++ b/addons/website_slides/controllers/main.py
@@ -557,9 +557,9 @@ class WebsiteSlides(WebsiteProfile):
return response
@http.route('/slides/slide/<int:slide_id>/get_image', type='http', auth="public", website=True, sitemap=False)
- def slide_get_image(self, slide_id, field='image_medium', width=0, height=0, crop=False):
+ def slide_get_image(self, slide_id, field='image_128', width=0, height=0, crop=False):
# Protect infographics by limiting access to 256px (large) images
- if field not in ('image_small', 'image_medium', 'image_large'):
+ if field not in ('image_64', 'image_128', 'image_256', 'image_512', 'image_1024', 'image_1920'):
return werkzeug.exceptions.Forbidden()
slide = request.env['slide.slide'].sudo().browse(slide_id).exists()
@@ -846,7 +846,7 @@ class WebsiteSlides(WebsiteProfile):
def _get_valid_slide_post_values(self):
return ['name', 'url', 'tag_ids', 'slide_type', 'channel_id', 'is_preview',
- 'mime_type', 'datas', 'description', 'image', 'index_content', 'website_published']
+ 'mime_type', 'datas', 'description', 'image_1920', 'index_content', 'website_published']
@http.route(['/slides/tag/search_read'], type='json', auth='user', methods=['POST'], website=True)
def slide_tag_search_read(self, fields, domain):