Attachment “Preview” URL redirects to the page’s Attachment list instead of opening the viewer

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Component/s: Site - Security
    • None
    • Severity 3 - Minor
    • Warranty

      Problem

      A direct click on an attachment-preview link, or opening the preview URL in a browser tab fails to show the file in Confluence’s attachment viewer. The viewer flashes briefly and then closes, or the user is taken to the page’s Attachment list.

      Environment

      • Confluence Cloud
      • Affects PDF (and possibly other-type) attachments accessed through a “Preview” URL

      Steps to Reproduce

      1. On a Confluence page, upload an attachment, for example, a PDF.
      2. Insert a link by selecting the PDF from the attachment list (don't embed), set Link text, and insert. (Alternatively, add a link using the direct preview URL (same structure as below) and click it).
      3. Publish the page and click the link to open the PDF preview.

      The Preview link can also be obtained by clicking the "View" link actions in the attachments menu for the content (the first time doesn't work, but the second time, you get the preview link).

      • Direct preview URL structure observed:
        https://<instance-url>.atlassian.net/wiki/pages/viewpageattachments.action?pageId=<page-id>&fromFileId=<file-id>&preview=/<page-id>/<file-id>/<file-name>.pdf
        

      Expected Results

      The PDF opens and stays visible in the Confluence attachment-preview modal.

      Actual Results

      Preview attempts to open, briefly flashes, then closes automatically. The viewer does not remain open, and the PDF can't be previewed.

      In some cases, the link is opening the Attachments list for the page instead

      • Embedding the file on the page allows the preview to work.
      • Fails when using an attachment link or the direct preview URL.

      Workaround

      Insert the attachment macro, and click on Preview from the macro.

      Notes

      • Appears related to CONFCLOUD-81794; behavior has regressed for attachment-link previews, worsening the user experience.

            Assignee:
            Chris Norwood
            Reporter:
            Edson B [Atlassian Support]
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: