Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20314

Uploading image.png using image dialog creates badly named attachments

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    Description

      Reproduction steps:

      • use either the new or old image dialog
      • make the wiki multi-lingual
      • add a new supported language (e.g., fr)
      • make the new language the default language
      • Create a new page, upload an image named image.png (other filenames works) and insert it using the image dialog
      • Save the page

      Expected

      The attachment name is substituted to the following pattern "${datetool.date.time}-${mathtool.random(100, 1000)}.$extension"

      It used to be the case before switching to the temporary upload mechanism, where this logic is currently missing.

      Actual results:

      The page contains an attachment named {}fileCreatedFromDataURI{}.png

       

       

      Additional note:

      Copy-and-pasted images on windows are always named image.png, leading to the behavior described above for all pasted images.

       

       

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              mleduc Manuel Leduc
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: