-
Bug
-
Resolution: Won't Fix
-
High
-
18
-
Severity 3 - Minor
-
Summary
Some PDFs are not displaying in macros in Confluence pages when view if their media type is application/pdf. Those affected PDFs are failing in all Confluence pages, even if you add it to a different clean Confluence instance running the same version
Steps to Reproduce
- Edit any Confluence page
- Add the PDF to the page and save it (displaying the PDF as a macro)
- Make sure that the media type is application/pdf
- Click the PDF macro in the page to view it
Expected Results
The PDF is displayed.
Actual Results
The following error is shown:
Ouch! We can't load the PDF.
JS console shows us this:
Unrecognized Content-Security-Policy directive 'frame-ancestors'.
Failed to load resource: cancelled
Notes
This can be seen consistently in Safari and in Firefox. Chrome is not affected (not tested in IE/Edge).
Workarounds
Workaround 1
Changing the media type to anything other than application/pdf resolves this issue:
- Go to the page where the attachment is
- Click '...' >> 'Attachments (7)'
- Find the affected PDF and click 'Properties' next to it
- Edit New Content Type to something else, we advise adding a single character, so it's easy to undo if needed
- Save it
Workaround 2
Ask Atlassian Support to disable the filestore.direct.download dark feature. This will require a downtime.