-
Improvement
-
Resolution: Done
-
Minor
-
None
-
3.5
-
None
-
MOODLE_35_STABLE
Hi,
a user of us came up with this problem. He copied and pasted a chart from an Excel file and pasted it to the feedback as comment area of an assignment. The image is displayed there. He saved this and still saw the image. Then he contacted us because the user cannot see this image when he opens his assignment and has a look at the feedback.
The cause is that this image preview is processed by the browser and a blob src url is created. However this image is never been saved to a file area on the server from where this image could be restored. However the user thinks that everything worked correctly as he did not get an error message and if he comes back to that editor within the same session, he still sees the image correctly.
We think that this case should be handled, because the user cannot assume that something won't be processed at this place. This could be either by saving those images to the server (better way) or by not displaying those images in the editor (ideally with a short error message).
Steps to reproduce:
- Login as a teacher
- Go to one of your courses and turn editing on
- Add a label to the course
- Open the attached Excel file
- Copy the chart from the Excel file
- Paste the image to the text area in Moodle
- See that the chart is displayed correctly as an image
- Go to the web inspector and take a look at this image file
- See that the img src url looks like this blob:https://your.moodle.com/e767202d-d697-423e-9740-cc82f9d368f9 (the code is uniquely generated and it won't be the same as in this example)
- Save the changes to your label
- See that the image is displayed correctly in the course
- Logut, empty the cache and login again
- Go back to the course
- See that the image is broken now
Hint:
You can try to paste the chart into this Jfiddle to see that the processing of a pasted image into a blob url is done by default for contenteditable divs: https://jsfiddle.net/t0bj8gy7/
Maybe this issue could be declared as a bug but I was unsure, so I decided for improvement.
Best, Kathrin
- will be (partly) resolved by
-
MDL-47750 Make pasting images into the Atto HTML editor work (as much as browsers will let us)
- Closed