Image upload attachments with the same name overwrite each other


The image attachment feature available on the TinyMCE html editor does not warn when uploading another image with the same file name of one uploaded before.
Only one image will show in the attached files in the end.

Steps to Reproduce


Save two different image files in PNG format with same filenames in different locations on your local disk.

  1. Login to OOB instance
  2. Open any active incident
    • Right click on header form layout
    • On the incident form, add a field called Description
    • Update
  3. On the incident form
    • Right click on Description field
    • Change the field type for Description from string to html
    • Update
  4. On the incident form, notice that Html editor is available on Description field
  5. In Html editor, click on image upload icon
  6. Upload first image file, and then click OK
  7. Upload second image file, and then click OK 

Notice that the second image file is not attached in Description.



Different file names need to be used.

The enhancement request FTASK18075 has been created to possibly introduce a warning message.

Limited to the TinyMCE HTML editor uploads, the UI Page html_insert_image_dialog can be modified by adding:

GlideDialogWindow.get().setPreference('force_replace', 'false');

Related Problem: PRB580050