Files
odoo_source/addons/web_editor
Samuel Degueldre ff8070033b [FIX] web_editor: show mimetype warning for illustrations
Previously, when clicking on an illustration in the editor, the image
options would be unavailable with a message saying that it was due to
technical limitations, and that the user should reselect the image in
the media-dialog for quality options to become available. This was
caused by the fact that in order to support more than one customizable
color in illustrations, they are now saved inside the database with an
url containing which colors are customizable inside the url's query
parameters. Since the endpoint that finds which attachment corresponds
to which image src was looking for an exact URL match, but query params
are trimmed on the client side before talking to the endpoint, they were
no longer matching.

This commit fixes that by searching for attachments whose URL matches
the provided one with or without any extra query parameters.

closes odoo/odoo#67625

X-original-commit: b26319c3c9409e8724fadeec80e63ea94dc8d599
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 17:59:34 +00:00
..