[OCISDEV-137] Markdown editor can't upload pictures
Describe the bug
When trying to upload a pic in Markdown editor (which is very cool now! 💯), via drag-and-drop or with the specific button for that purpose in toolbar ("Upload Images"), nothing happens.
Steps to reproduce
1. Open Markdown editor
2. Drag and drop an image from any folder in your computer
OR
1. Open Markdown editor
2. Select "Upload Images" and select an image
Expected behavior
The picture should be uploaded and when finished, shown in the Markdown file via [name](url) syntax.
Actual behavior
Nothing happens: no loading, no result, no error appears... there's no feedback.
Setup
I'm using infinite.owncloud.com, so:
- Web version: ownCloud Web UI 11.3.0
- oCIS version: Infinite Scale 7.1.0 Enterprise
- browser: Google Chrome
Additional context
No response
For now, we're going to hide it (https://github.com/owncloud/web/pull/12460) as we need to come up with some creative solution for it. If there is any.
The current issue is that there is nothing set to handle uploads. The upload part is fairly simple, we can upload the image into the same folder as the file is in. However, that introduces two new issues.
First issue is in case where the file is shared via public link (only the single file, not the parent folder) in which case user looses permissions to view/edit the images.
Second issue is a bit bigger. Right now, we're displaying images in Web using blobs. That works fine in context where we can use async loading to always get a new blob. But, the markdownit package does not support async rules when parsing content so we cannot simply fetch the blob. We cannot also fetch it after the upload and just save it because it would be gone after refresh.
I'll keep this issue open but will mark it as blocked. It's a pity that the upload will be hidden now but at least we're not showing "non-functioning" features. Of course adding image via a link still works.
You can still upload the image and convert it to base64, markdown is able to display it. So you don't need to actually persist it on the server.
I tried this and yes, the markdown displays it fine. However, the editor part then becomes quite frustrating because instead of a simple  you end up with something like this:

Having to scroll around it to get to whatever you want to change is already bad enough UX. Also, it might be a bit scary to regular user who has no idea about base64... thank you for the hint anyway ❤
The b64 might be quite long, that's correct, but you can identify the element and give it a max height and make it scrollable. That behaviour would be identical to the behaviour with the previous markdown editor
md-editor-v3 has been updated and now includes a link shortener 👍