summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-05-07 11:16:20 +0200
committerNicolas Martinelli <nim-odoo@users.noreply.github.com>2018-05-08 08:58:22 +0200
commit5a1c78986126530ba1720e28fe10111752f0dc52 (patch)
tree486f5a96fb63368e12d0a8c6936237a7de360efb /addons/web/static/src/js/views/basic/basic_controller.js
parent013baed41376f3b5b84bfa4a29cacb3774af6e28 (diff)
[FIX] web_editor: drag and drop
Commit 6494f511718 introduces an access token to read images inside an email. This avoids access errors when accessing the email through a proxy (e.g. Gmail). That implies that all images are added as attachments. When going through the usual media dialog, the form is submitted to action '/web_editor/attachment/add', creating the attachment. However, the copy or the drag and drop of an image completely fails. Indeed, the same method `_onImageUpload` is called, but with a completely different argument type: `attachments` is a `FileList`, not a list of attachments. To solve this, we only call `_onImageUpload` on a the custom `onUpload` callback, which is not triggered during a drag and drop or a copy. Any image included thanks to these methods will be post-processed in the `create` method of `mail.message` (`base64_to_boundary`). Unfortunately, it's not possible to simulate an actual drag and drop or a copy, so we cannot add a test. opw-1840237 opw-1840411
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions