Unable to Preview attachments when viewing a page but other attachment functions work without issue
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
When clicking on an attachment to preview it, in the normal page view, nothing occurs.
Previewing an attachment when in edit mode works fine
Previewing/viewing the attachment on the attachments page works fine
Downloading files works without issue
The following appears in the HAR output when attempting to preview the image:
Response | Request |
---|---|
404 | POST <base_url>/rest/files/1.0/files/content/xxxxxxxx/minusAttachment |
404 | POST <base_url>/rest/files/1.0/files/content/xxxxxxxx/byAttachmentIds |
Diagnosis
Diagnostic Steps
Verify the Confluence Document Conversion Library,Confluence Previews, Confluence Files (confluence-files), Confluence View File Macro system apps are all enabled, also verify that all their modules are enabled. For Office documents, also check that the Office Connector app is enabled.
Settings > General Admin > Manage Add-ons > select System from the drop down menu > search for Confluence Document Conversion Library
Alternatively, you can also run the below SQL query against your database to see any Confluence apps that are currently disabled
1
SELECT BANDANAVALUE FROM BANDANA WHERE BANDANAKEY = 'plugin.manager.state.Map';
And you should see this in the results:
1 2
<string>com.atlassian.confluence.plugins.confluence-document-conversion-library</string> <boolean>false</boolean> <string>com.atlassian.confluence.plugins.confluence-files</string><boolean>false</boolean>
Cause
Some modules in the Confluence Previews app are dependent on the Confluence Document Conversion Library andConfluence Files(confluence-files). If either or both are disabled it will not be possible to preview files on the page though other preview and download actions work as expected.
Solution
Resolution
Re-enable the Confluence Document Conversion Library app (and any other required apps):
Settings > General Admin > Manage Add-ons > select System from the drop-down menu > search for Confluence Document Conversion Library and Confluence Files (confluence-files)
Enable the Confluence Document Conversion Library andConfluence Files (confluence-files) plugin
Enable any disabled modules
You should now be able to preview files on the page
You can also clear all the Confluence apps back to their default state by following this article: How to reset all Confluence Data Center plugins back to their default state through the database
Please ensure you create the proper backups of your instance and database, and stage a test prior to making changes to your production database
Was this helpful?