On Wed, Jan 4, 2017 at 4:22 AM, novnovice <novnov...@gmail.com> wrote:
> That's interesting...I just tried it again and at first it seemed that the > issue was solved. Several pasted images were added to the page, each with > it's own distinct name. I was copy/pasting from saved files. > > I made some additional experiments and discovered how it was that I saw > that > image replacement behavior. In my original tests I was taking a screenshot, > and pasting the image in directly from the buffer. In each case the image > was named "image.png" and effectively the second copy/paste overwrote the > first image. The screen capture software offers the image in each case with > the name image.png. > > So it's not really an issue with xwiki. My legacy patterns which I hope to > replace in part with xwiki involve pasting images into word documents as > I'm > documenting a process. Word does not retain the image as a file per se; it > absorbs the file, and so there is no assigned file name, or chance of file > name conflict. xwiki does save the image as a file and has no mechanism > (that I know of) for detecting that the two images are different and then > saving the two images as separate files. > The CKEditor uses the file name specified by the OS/Browser. If the file name is not specified then it uses a default name https://github.com/xwiki-contrib/application-ckeditor/blob/master/ui/src/main/resources/CKEditor/EditSheet.xml#L250 which leads to a random (unique) attachment name https://github.com/xwiki-contrib/application-ckeditor/blob/master/ui/src/main/resources/CKEditor/FileUploader.xml#L69 . So the fact that the attachment is saved as "image.png" in your case it indicates that the OS / Browser / the image source (where you copied it from, e.g. the clipboard) specifies the "image.png" name. So CKEditor has to use it. Note that in some cases you want to overwrite an existing attachment. You edit a page that has an image and you want to upload a different image with the same name to replace it. > > If there is an add in that might mitigate this issue that would be ideal, > but I might guess there is not. I may be able to defeat the brain dead > clipboard paste name of image.pgn, and that would solve things very well. > > Thank you for your input...since you reported, and I confirmed, that > pasting > multiple images can work, I had to look again at why it wasn't working in > my > test. > > > > -- > View this message in context: http://xwiki.475771.n2.nabble. > com/Is-there-an-easy-way-to-copy-paste-multiple-images- > onto-a-page-tp7602229p7602259.html > Sent from the XWiki- Users mailing list archive at Nabble.com. >