Attachment Preview is not Working

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

When any user access any page with a file (.doc, .xlsx, .pdf, etc.) attached to it and click on the file, nothing happens, however, if the user tries to download the file, the operation happens succesfully. Confluence was supposed to render a preview of the attached document instead, like can be seen in the image below:

Diagnosis

It is important to ensure that the problem is happening to all files attached to the application, regardless of the page/space they are attached to. In order to confirm this, create a test space with a test page and attach a test file to it. In case the file renders properly, this may not be the right knowledge base for you and it is recommended to take a look on the Troubleshooting Attachments Documentation to continue the investigation.

In case you have been able to reproduce the problem once again, then you came to the right place.

Cause

This problem happens because one or more application modules accountable for rendering file previews has been disabled. The modules are related to below plugins:

  • Confluence File Notifications
  • Confluence Files

As Confluence restful calls used to render the files does not work without some modules made available through above plugins, the files are not rendered. To confirm that this is indeed the problem, you can grep the application logs for entries similar to the ones below:

2018-03-12 15:00:14,723 INFO [http-nio-443-exec-2] [atlassian.plugin.manager.DefaultPluginManager] broadcastPluginDisabling Disabling com.atlassian.confluence.plugins.confluence-file-notifications

2018-03-12 15:00:14,773 INFO [http-nio-443-exec-2] [atlassian.plugin.manager.DefaultPluginManager] broadcastPluginDisabling Disabling com.atlassian.confluence.plugins.confluence-files

And in parallel to that, you may want to capture a .HAR File and observe the response given by the application to restful calls - It should be a 404 since the plugins are disabled:

Workaround

  1. Login to Confluence as an administrator.
  2. Click on the Cog Icon in your right upper corner and then select add-ons.
  3. Select all add-ons and search by confluence file and confluence-files This should bring both add-ons to the screen.
  4. Ensure that both are enabled by clicking on the Enable button accordingly.
  5. Shutdown Confluence.
  6. Clear your plugin cache.
  7. Restart the application.
  8. Try to preview files again, it should work fine this time.

Resolution

As the root cause of why the plugins have been disabled is not clear at this point, there's not a definitive resolution yet, but workarounds only.

One possibility is this bug: CONFSERVER-58313 - Getting issue details... STATUS  

Last modified on Jan 10, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.