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

Downloading a .docx file in IE7/WinXP gives it a .zip extension (technically true but the average end-user wouldn't know that).

      1. mime.types
        4 kB
      2. servlet.zip
        6 kB

          [CONFSERVER-17718] Downloading a .docx file in IE7/WinXP gives it a .zip extension (technically true but the average end-user wouldn't know that).

          Dear Suma Ramki,

          Are you referring to CONF-18951? Yes, that was fixed in Confluence 3.3.

          Best regards,
          Stefan

          Stefan Saasen (Inactive) added a comment - Dear Suma Ramki, Are you referring to CONF-18951 ? Yes, that was fixed in Confluence 3.3. Best regards, Stefan

          Lakshmi added a comment -

          Is spreadsheet related bug is fixed as mentioned version of confluence which is 3.3?

          Lakshmi added a comment - Is spreadsheet related bug is fixed as mentioned version of confluence which is 3.3?

          Hi Maxime,

          I added your request to the following issue: CONF-18951

          The mime type for the macro enabled spreadsheet will be fixed in version 3.3 of Confluence.

          Best regards,
          Stefan Saasen

          Stefan Saasen (Inactive) added a comment - Hi Maxime, I added your request to the following issue: CONF-18951 The mime type for the macro enabled spreadsheet will be fixed in version 3.3 of Confluence. Best regards, Stefan Saasen

          The issue is not fixed for file type XLSM , just to let you guys know as those macro enabled excel spreadsheets are a vital part of our usage of confluence. I urge you to fix this as soon as humanly possible.

          Maxime Bédard added a comment - The issue is not fixed for file type XLSM , just to let you guys know as those macro enabled excel spreadsheets are a vital part of our usage of confluence. I urge you to fix this as soon as humanly possible.

          Roy Hartono [Atlassian] added a comment - - edited

          For Confluence 3.1.2, please find attached a patch that includes fixes from CONF-17718 and CONF-19045: servlet.zip

          You need to unzip the file so the directory structure is as follow: <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download and restart Confluence.

          There will be three files in /download folder: AttachmentDownload.class, AttachmentDownload$MimeTypeTranslator$MimeTypeTranslation.class, AttachmentDownload$MimeTypeTranslator.class.

          After you have unzipped the patch their path should look like this:

          <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download/AttachmentDownload.class
          <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download/AttachmentDownload$MimeTypeTranslator$MimeTypeTranslation.class
          <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download/AttachmentDownload$MimeTypeTranslator.class
          

          edit: the patch works for 3.0.x as well

          Roy Hartono [Atlassian] added a comment - - edited For Confluence 3.1.2, please find attached a patch that includes fixes from CONF-17718 and CONF-19045 : servlet.zip You need to unzip the file so the directory structure is as follow: <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download and restart Confluence. There will be three files in /download folder: AttachmentDownload.class, AttachmentDownload$MimeTypeTranslator$MimeTypeTranslation.class, AttachmentDownload$MimeTypeTranslator.class. After you have unzipped the patch their path should look like this: <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download/AttachmentDownload.class <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download/AttachmentDownload$MimeTypeTranslator$MimeTypeTranslation.class <confluence install>/confluence/WEB-INF/classes/com/atlassian/confluence/servlet/download/AttachmentDownload$MimeTypeTranslator.class edit: the patch works for 3.0.x as well

          Resolving as fixed - downloaded file type is now correct for docx/dotx/pptx/ppsx/potx files.
          As mentioned above, this is a partial fix in Confluence 3.2, and comes with the following caveats:

          1) The mime types in the database will still be incorrect if the browser sends them incorrectly. This fix only overrides the mime type at the point when the file is downloaded. So if there are plugins that rely on the mime type being correct on the server side, they will still encounter this issue (CONF-18951).
          2) The fix does not apply to xlsx and xltx files, which will still download as .zip files (CONF-19045).
          3) The fix does not apply to other files such as MindMap files (CONF-18951).

          Penny Wyatt (On Leave to July 2021) added a comment - Resolving as fixed - downloaded file type is now correct for docx/dotx/pptx/ppsx/potx files. As mentioned above, this is a partial fix in Confluence 3.2, and comes with the following caveats: 1) The mime types in the database will still be incorrect if the browser sends them incorrectly. This fix only overrides the mime type at the point when the file is downloaded. So if there are plugins that rely on the mime type being correct on the server side, they will still encounter this issue ( CONF-18951 ). 2) The fix does not apply to xlsx and xltx files, which will still download as .zip files ( CONF-19045 ). 3) The fix does not apply to other files such as MindMap files ( CONF-18951 ).

          The Excel file extensions will be fixed in 3.2.1 (see CONF-19045).

          Stefan Saasen (Inactive) added a comment - The Excel file extensions will be fixed in 3.2.1 (see CONF-19045 ).

          QA reviewed in Confluence 3.2 on QA-EAC.

          The issue is still reproducing for Excel files because the file extensions are incorrect.

          • Excel spreadsheets are ".xlsx", not ".xslx"
          • Excel templates are ".xltx", not ".xslt"

          Penny Wyatt (On Leave to July 2021) added a comment - QA reviewed in Confluence 3.2 on QA-EAC. The issue is still reproducing for Excel files because the file extensions are incorrect. Excel spreadsheets are ".xlsx", not ".xslx" Excel templates are ".xltx", not ".xslt"

          Hi Carol,

          Sorry my comment probably wasn't making that clear: Updating the mime.types does not resolve this problem.

          When you click on an attachment link, Confluence will use the mime type (aka content type) that the browser used for uploading the file.
          E.g. if you use an older version of Internet Explorer the browser sends the content-type "application/x-zip-compressed" when you upload a .docx file and this is what Confluences stores.
          If you then click on the attachment link the file open/save dialog will use the content type to determine the type of the file and in this case it will think that the file is a zip file.
          If you use Firefox 3.6 for the file upload it correctly sends "application/vnd.openxmlformats-officedocument.presentationml.presentation" if you upload a .docx file.
          The browser you use to download the file will use this mime type for the file open/save dialog and will detect that it is an Office XML file.

          This problem occurs if the browser used to upload a particular file does not send the correct content type. Unfortunately this is not limited to Office XML files.

          At least for Office XML files this will be fixed in the next version and I added another issue that addresses the underlying problem (see CONF-18951).

          Best regards,
          Stefan

          Stefan Saasen (Inactive) added a comment - Hi Carol, Sorry my comment probably wasn't making that clear: Updating the mime.types does not resolve this problem. When you click on an attachment link, Confluence will use the mime type (aka content type) that the browser used for uploading the file. E.g. if you use an older version of Internet Explorer the browser sends the content-type "application/x-zip-compressed" when you upload a .docx file and this is what Confluences stores. If you then click on the attachment link the file open/save dialog will use the content type to determine the type of the file and in this case it will think that the file is a zip file. If you use Firefox 3.6 for the file upload it correctly sends "application/vnd.openxmlformats-officedocument.presentationml.presentation" if you upload a .docx file. The browser you use to download the file will use this mime type for the file open/save dialog and will detect that it is an Office XML file. This problem occurs if the browser used to upload a particular file does not send the correct content type. Unfortunately this is not limited to Office XML files. At least for Office XML files this will be fixed in the next version and I added another issue that addresses the underlying problem (see CONF-18951 ). Best regards, Stefan

          OK, working fine now, cannot duplicate any of the problems from an hour ago. Still not feeling too confident - we'll just watch and wait for a few days, see how it goes. . .

          Carol Blanchar added a comment - OK, working fine now, cannot duplicate any of the problems from an hour ago. Still not feeling too confident - we'll just watch and wait for a few days, see how it goes. . .

            ssaasen Stefan Saasen (Inactive)
            8094a61ec4f8 Blitz Bot
            Affected customers:
            9 This affects my team
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: