Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-24878

cannot download pasted images as a zip because of the naming convention, in Windows

      Summary

      Unable to Download All attachments in Confluence caused by image files named imageYYYY-M-D h:m:s.png.

      Environment

      • Windows

      Steps to Reproduce

      1. Take an image to clipboard clipboard by either:
        • Take a "Printscreen"
        • or use Windows' "Snippet Tool" to saved your screen to clipboard
      2. Use "CTRL + V" to attach it into a Confluence page
      3. The editor creates an attached image file named imageYYYY-M-D h:m:s.png
      4. Go to Page Tools > Attachments > Download All

      Expected Results

      All attachments are downloaded

      Actual Results

      Confluence will throw the following ERROR

      Cause
      java.io.FileNotFoundException: D:\AtlassianData\Confluence\502data\temp\downloadf5o6S163731\image2013-6-6 16:36:21.png (The filename, directory name, or volume label syntax is incorrect)
          at java.io.FileOutputStream.open(Native Method)
      Stack Trace:[hide]
      java.io.FileNotFoundException: D:\AtlassianData\Confluence\502data\temp\downloadf5o6S163731\image2013-6-6 16:36:21.png (The filename, directory name, or volume label syntax is incorrect)
      

      as the colon is a special character which is prohibited in Windows file names.

      Notes

      1. It would be better to avoid this problem by removing colons from the pasted images. Perhaps with the format:
        imageYYYY-MM-dd_hhmmss.png
      2. additionally give the admin the possibility to change the naming scheme in the settings.

      Workaround

      The only workaround is to edit the properties of the attachment and remove the colons.

            [CONFSERVER-24878] cannot download pasted images as a zip because of the naming convention, in Windows

            Tobias this bug has been "fixed" by modifiying the upload procedure of pasted images. They get a new and compatible file name without spaces now.

            As the file your error is relating to has been uploaded with an older version of confluence, the fix has no effect. There ha no automagic way been implented to modify existing file names on demand during the download.

            So the (manual) fix for your problem would be to change the file name to a compatible one and enjoy the automatically correctly set names for future uploads.

            Regards
            Stefan

            Stefan Kahlhöfer (Novatec) added a comment - Tobias this bug has been "fixed" by modifiying the upload procedure of pasted images. They get a new and compatible file name without spaces now. As the file your error is relating to has been uploaded with an older version of confluence, the fix has no effect. There ha no automagic way been implented to modify existing file names on demand during the download. So the (manual) fix for your problem would be to change the file name to a compatible one and enjoy the automatically correctly set names for future uploads. Regards Stefan

            TobiasR added a comment -

            I get the same error in Version 6.4.3 using Windows Server 2016:

            Cause

            java.io.FileNotFoundException: D:\ConfluenceHome\temp\downloadnAN67151331\image2017-10-26 14:35:47.png (Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch)
                at java.io.FileOutputStream.open0(Native Method)

             

            Should I create a new Ticket?

             

            Greetings

            Tobias Röhmer

            TobiasR added a comment - I get the same error in Version 6.4.3 using Windows Server 2016: Cause java.io.FileNotFoundException: D:\ConfluenceHome\temp\downloadnAN67151331\image2017-10-26 14:35:47.png (Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch)     at java.io.FileOutputStream.open0(Native Method)   Should I create a new Ticket?   Greetings Tobias Röhmer

            A fix for this issue is now available for Confluence Server customers.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Jade Giacoppo (Inactive) added a comment - A fix for this issue is now available for Confluence Server customers. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Superb, thank you slancashire!

            Nick Muldoon added a comment - Superb, thank you slancashire !

            This is now fixed in cloud

            Steve Lancashire (Inactive) added a comment - This is now fixed in cloud

            Please lets just change the ":" to a "-" when saving a screenshot and this will help lots of people heaps.

            Stuart Hirst added a comment - Please lets just change the ":" to a "-" when saving a screenshot and this will help lots of people heaps.

            Agree with Neeraj Tiwari. Please provide an ETA for this fix as its currently preventing the publishing of document. Ive just looked at the date of first comment and gotten a sinking feeling.....

            Please could someone at Atlassian at least say if this will ever be fixed ?

            Stuart Hirst added a comment - Agree with Neeraj Tiwari. Please provide an ETA for this fix as its currently preventing the publishing of document. Ive just looked at the date of first comment and gotten a sinking feeling..... Please could someone at Atlassian at least say if this will ever be fixed ?

            Please give an ETA for a fix for this issue. I think an easy fix would be that Confluence does not add a “colon” in the file-names of attachments added using screenshot in the first place!

            Neeraj Tiwari added a comment - Please give an ETA for a fix for this issue. I think an easy fix would be that Confluence does not add a “colon” in the file-names of attachments added using screenshot in the first place!

            This bug is still in version 5.9.3. Can we get a fix or is there at least an option to set the format?

            Rick Beecroft added a comment - This bug is still in version 5.9.3. Can we get a fix or is there at least an option to set the format?

            Also, when using Windows, it is impossible to edit this image and upload it as a new version. Because Windows does not support a colon ':' in a file name you cannot save the file locally with the colons. Thus, the file name will not be in the required format to make a new attachment version.

            The only workaround is to edit the properties of the attachment and remove the colons.

            Chad Barnes added a comment - Also, when using Windows, it is impossible to edit this image and upload it as a new version. Because Windows does not support a colon ':' in a file name you cannot save the file locally with the colons. Thus, the file name will not be in the required format to make a new attachment version. The only workaround is to edit the properties of the attachment and remove the colons.

              dunterwurzacher Denise Unterwurzacher [Atlassian] (Inactive)
              0038f8321e0c Stefan Kahlhöfer (Novatec)
              Affected customers:
              20 This affects my team
              Watchers:
              25 Start watching this issue

                Created:
                Updated:
                Resolved: