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

Unable to Preview PDF Attachment Link Due to Wrong MEDIA_TYPE After Upgrade

      When an attachment type is "pdf" instead of "application/pdf" added to Confluence page as Link > Attachments, upgrading the instance to version 5.7 will not allow that Link to be previewed with the File Preview feature.

      Steps to replicate

      1. Run Confluence version prior to 5.7 (e.g. 5.6.3)
      2. Create a new page and click Link > Attachments, then insert a PDF file (e.g: with the name "Test.pdf")
      3. Save the page
      4. Go to Tools >> Attachments, then click 'Properties' link on the "Test.pdf"
      5. Modify 'New Content Type' from application/pdf to pdf, and Save
      6. Upgrade Confluence to 5.7
      7. In that same page, click "Test.pdf"

      Observation

      • The "Test.pdf" link is not displayed in File preview
      • Inserting new Link > Attachments (e.g: "Test_2.pdf") in that page will allow the link "Test_2.pdf" to be displayed in File preview
      • Prior to version 5.7, the CONTENTTYPE is stored in ATTACHMENTS table. In version 5.7, this information is migrated to CONTENTPROPERTIES table

      Workaround
      Run the following SQL query:

      update contentproperties set STRINGVAL = 'application/pdf' where PROPERTYNAME = 'MEDIA_TYPE' AND STRINGVAL = 'pdf';
      

      KB Article

            [CONFSERVER-36666] Unable to Preview PDF Attachment Link Due to Wrong MEDIA_TYPE After Upgrade

            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2898221 ] New: CONFSERVER Bug Workflow v4 [ 2992799 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2790360 ] New: JAC Bug Workflow v3 [ 2898221 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2720240 ] New: JAC Bug Workflow v2 [ 2790360 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2389285 ] New: JAC Bug Workflow [ 2720240 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 2267017 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2389285 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2219536 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 2267017 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2153850 ] New: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2219536 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 1923231 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2153850 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v3 [ 1725939 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 1923231 ]
            Katherine Yabut made changes -
            Workflow Original: CONF Bug Subtask WF (TEMP) [ 1681221 ] New: Confluence Workflow - Public Facing - Restricted v3 [ 1725939 ]

              Unassigned Unassigned
              prompas Patrice Rompas (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: