Uploaded attachments can't be viewed and downloaded attachments give network error

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

Problem

  • Uploaded attachments cannot be displayed.

  • Preview shows an Ouch! We can't load the image. message.

  • Downloaded attachments generate a network error.

(Auto-migrated image: description temporarily unavailable)

The following appears in the atlassian-confluence.log

atlassian-confluence.log

1 2 3 4 5 6 7 8 2016-04-07 14:34:48,501 ERROR [http-nio-8090-exec-6] [[Standalone].[localhost].[/].[file-server]] log Servlet.service() for servlet [file-server] in context with path [] threw exception java.lang.NullPointerException at com.atlassian.confluence.importexport.resource.ExportDownloadResourceManager.getExportRoot(ExportDownloadResourceManager.java:99) at com.atlassian.confluence.importexport.resource.ExportDownloadResourceManager.matches(ExportDownloadResourceManager.java:31) at com.atlassian.confluence.importexport.resource.DelegatorDownloadResourceManager.getResourceReaderFromDelegate(DelegatorDownloadResourceManager.java:67) at com.atlassian.confluence.importexport.resource.DelegatorDownloadResourceManager.getResourceReader(DelegatorDownloadResourceManager.java:30) at com.atlassian.confluence.servlet.download.AttachmentDownload.getStreamForDownload(AttachmentDownload.java:71) ...

Cause

The parameter

  • <property name="webwork.multipart.saveDir">${confluenceHome}/temp</property>

is missing from confluence.cfg.xml.

Resolution

  1. Shut down Confluence

  2. Edit <local-home>/confluence.cfg.xml and add (or edit to match) the line

    confluence.cfg.xml

    1 <property name="webwork.multipart.saveDir">${localHome}/temp</property>
  3. Restart Confluence.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.