How to rebuild the file preview cache from scratch in Confluence
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
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
folder for any file rendered using the following macros:<confluence_home>
/viewfile
- Office Excel
- Office PowerPoint
- Office Word
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
- Stop Confluence
- In the filesystem go to your
<confluence_home>
folder - Delete the contents within the following folders (or move the entire folder to another directory)
<confluence_home>
/viewfile<confluence_home>/shared-home/dcl-document/
<confluence_home>/shared-home/dcl-document_hd/
<confluence_home>/shared-home/dcl-thumbnail/
- Start Confluence
- The file preview cache will rebuild, and documents should render as expected