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

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

  • Uploaded attachments cannot be displayed.
  • Preview shows an Ouch! We can't load the image. message.
  • Downloaded attachments generate a network error.

The following appears in the atlassian-confluence.log

atlassian-confluence.log
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
    <property name="webwork.multipart.saveDir">${localHome}/temp</property>
  3. Restart Confluence.


Last modified on Oct 27, 2021

Was this helpful?

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