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

Images attached to a page from Clipboard (via Printscreen) cannot be downloaded via "Download All" in Windows

      Steps to Reproduce:

      1. Edit a page
      2. Take a "Printscreen" or use Windows' "Snippet Tool" to saved your screen to clipboard
      3. Use "CTRL + V" to attach it into the page
      4. Confluence will attach the image file from the clipboard to the page
      5. Ensure there are multiple attachment on the page
      6. Saved the page
      7. Go to attachment menu from the "Tools" button
      8. Click "Download All" button
      9. 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)

      Expected Results:

      User should be able to download the zipped attachments

      Actual Results:

      Users does not able to download the attachments and thrown an ERROR page instead. Judging from the stack trace, it seems that Confluence unable to find the temp file generated by the function.

      Cause

      This problem is caused because the filename contains a colon (':') which is not a character allowed in a filename according to MS Windows documentation. Due to the invalid name, Confluence is not able to create the file in the temp folder to generate the ZIP file.

      This bug appears only when Confluence is running on Windows.

            [CONFSERVER-29558] Images attached to a page from Clipboard (via Printscreen) cannot be downloaded via "Download All" in Windows

            Minh Tran added a comment -

            Dear all,

            This ticket has been marked as duplicate. Please follow the progress here https://jira.atlassian.com/browse/CONF-24878

            Thanks,
            Minh Tran
            Confluence BugMaster
            Atlassian

            Minh Tran added a comment - Dear all, This ticket has been marked as duplicate. Please follow the progress here https://jira.atlassian.com/browse/CONF-24878 Thanks, Minh Tran Confluence BugMaster Atlassian

            Hello Timo:
            We have modified the file names and now it works fine. Thank you for the explanation.
            Regardd.
            Rafael Tomasi

            protecmedia_it added a comment - Hello Timo: We have modified the file names and now it works fine. Thank you for the explanation. Regardd. Rafael Tomasi

            The problem is caused by the colon in the filename. Confluence tries to save the file to a temp directory before zipping it but Windows will not allow the file creation with a colon in the filename. A workaround is to rename the attachments ('properties') and remove the colons. Ideally Confluence should catch that an attachment name contains invalid characters and replace them before trying to save them.

            Timo Jansen added a comment - The problem is caused by the colon in the filename. Confluence tries to save the file to a temp directory before zipping it but Windows will not allow the file creation with a colon in the filename. A workaround is to rename the attachments ('properties') and remove the colons. Ideally Confluence should catch that an attachment name contains invalid characters and replace them before trying to save them.

              Unassigned Unassigned
              scahyadiputra Septa Cahyadiputra (Inactive)
              Affected customers:
              11 This affects my team
              Watchers:
              18 Start watching this issue

                Created:
                Updated:
                Resolved: