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

            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2889787 ] New: CONFSERVER Bug Workflow v4 [ 2982156 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2802755 ] New: JAC Bug Workflow v3 [ 2889787 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2737161 ] New: JAC Bug Workflow v2 [ 2802755 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2380356 ] New: JAC Bug Workflow [ 2737161 ]

            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
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 2266552 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2380356 ]
            Michael Andreacchio made changes -
            UIS Original: 3
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2210263 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 2266552 ]

              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: