WikiDocs icon indicating copy to clipboard operation
WikiDocs copied to clipboard

images don't show up

Open aguaviva opened this issue 3 years ago • 7 comments

They get uploaded and saved in the folder of the page but they don't show up

aguaviva avatar May 20 '22 18:05 aguaviva

can you try in the online demo?

Zavy86 avatar Sep 19 '22 09:09 Zavy86

Pasting an image works fine in the online demo. Dropping an image didn't work though.

So glad to see this project is alive!! :)

raul-machine-learning avatar Sep 19 '22 10:09 raul-machine-learning

Hi, I have try in the online demo both with paste and browse from file and it works. What is the file extension that are you trying to upload?

Zavy86 avatar Sep 19 '22 13:09 Zavy86

Hi guys, I have also tested it in the online demo.

  • Copying from snipping tool and pasting directly via ctrl+v (paste) in the editor - works.
  • Dropping an image (.png) from windows explorer into the area - nothing happens, no error at all.
  • Trying to copy from windows explorer (right click at the image -> copy) and pasting it with ctrl+v also nothing happens. I think it`s the same action as dropping is recognized.

Zavy what did you mean by saying "browse from file works", you mean the dropping into the editor is working on your side?

It seems that there are some different actions:

  1. Copy via hotkeys from clipboard to the editor. This is handled by the images.js (window.addEventListener("paste",function(e)...)
  2. Dropping files (drag n drop) into the editor, commonly this is handled by the editor itself. I couldn`t find any listener in the images.js for this.
  3. Editor upload dialog (not active, not tested)

If you enable uploadImage: true in the editor.js And if you now try to paste from clipboard, for example from the snipping tool

  1. It comes an alert.error dialog which says: "Something went wrong when uploading the image <filename>.<filetype>.
  2. The console is showing: "EasyMDE: The server did not return a valid json.".
  3. You can see your catched error from your images.js which is: {"error":null,"code":"image_uploaded","name":"62c74fa1982e664783dcab885948324d.png","path":"/documents/testing/62c74fa1982e664783dcab885948324d.png","size":22211}
  • As result the image is created (submit.php?act=image_upload_ajax) in the folder and the link is inserted as expected.

Unfortunately, I haven't had time to analyze it in more detail at the moment, but maybe it points you in the right direction of the image.js file.

serial avatar Sep 19 '22 18:09 serial

to upload an image you can use the blue icon in the top right of the edit page. in this modal window you can browser an image from your file system and upload It. drag and drop feature is not enable at this moment.

Zavy86 avatar Sep 19 '22 19:09 Zavy86

Ok, now I understand. The blue image-icon button is working perfectly! Then aguaviva means the uploaded images below the browse dialog?

serial avatar Sep 19 '22 19:09 serial

I meant that

  • pasting an image from the clipboard worked
  • drag and dropping an image from a folder didn't work.

aguaviva avatar Sep 19 '22 21:09 aguaviva

drag and drop feature is not implemented yet

Zavy86 avatar May 08 '23 07:05 Zavy86

Note that if you flag it as "completed" it means that the issue has been fixed/implemented. Note that the front page still claims this is an existing feature, you may want to under-promise and over-deliver (and not the other way around)

aguaviva avatar May 09 '23 15:05 aguaviva

This is still happening as of today.

aguaviva avatar Aug 09 '23 21:08 aguaviva