react-mde icon indicating copy to clipboard operation
react-mde copied to clipboard

Same images are being provided when trying to upload multiple images

Open prateek3255 opened this issue 3 years ago • 1 comments

When trying to upload multiple images the saveImage method returns the first image all the times. Here is a reproducible sandbox with v11.5.0 for it:

https://codesandbox.io/s/react-mde-latest-forked-lzhlxq?file=/src/index.js

To reproduce:

  • Try uploading multiple images in the sandbox above
  • Check the logs, to see the same image is logged for all cases

prateek3255 avatar Jun 02 '22 14:06 prateek3255

Unfortunately. I have almost no time to work on this library and I will be focusing on version 12 now, and it still doesn't support file uploads.

I quickly looked at your problem and it seems that, at least by uploading from the clipboard, the File objects seem to have different sizes. The preview is obviously the same because we are always yielding https://picsum.photos/300

image

andrerpena avatar Aug 15 '22 22:08 andrerpena