How to rebuild the file preview cache from scratch in Confluence

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.

Purpose

If you are having issues when rendering document previews within a Confluence page, you might want to try rebuilding the file preview caches.

Information

Confluence generates previews of certain file types when files are attached to a page. For example, you can attach a .docx file to a Confluence page, and then add the Office Word macro to the page to render the file directly on the page. Another option is to drag and drop the .docx file directly to the editor, which will attach it using the default file previewer.

These previews are generated and stored in the Confluence home folder - under the <confluence_home>/viewfile folder for any file rendered using the following macros:

  • Office Excel
  • Office PowerPoint
  • Office Word
  • PDF

And for any files that are dropped directly unto the page, Confluence will generate the attachment previews in the <confluence_home>/shared-home/dcl- folders. If these file previews are outdated, or if you'd like to regenerate these file previews for other reasons, you can follow the steps below.

Solution

  • Clear the file preview caches

    1. Stop Confluence
    2. In the filesystem go to your <confluence_home> folder
    3. Delete the contents within the following folders (or move the entire folder to another directory)
      1. <confluence_home>/viewfile
      2. <confluence_home>/shared-home/dcl-document/

      3. <confluence_home>/shared-home/dcl-document_hd/

      4. <confluence_home>/shared-home/dcl-thumbnail/

    4. Start Confluence
  • The file preview cache will rebuild, and documents should render as expected

Last modified on Apr 20, 2020

Was this helpful?

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