[FW][FIX] web_editor: do not use image when uploading document from URL #163687
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal of this commit is to forward port the original commit which was introduced in 16.4 but, due to an error, has not been forward ported.
Original commit message:
Since 1 when uploading images from URL the data is downloaded and then hosted on the Odoo instance. As stated in its task (task-3129360) it should not have been applied to document URLs.
Because of this, when hitting a CORS issue to fetch binary data, we try to fetch the data through an
<img>
element by setting itssrc
fieldThis commit makes the changes of 1 specific to image uploads and restores the previous behavior for other files.
Steps to reproduce:
=> Fails because of a CORS issue.
task-3493618
Forward-Port-Of: #163576