%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="org.apache.log4j.Level"%> <%@ page import="org.apache.log4j.Logger"%> <%@ page import="org.apache.log4j.WriterAppender"%> <%@ page import="org.apache.log4j.HTMLLayout"%> <%@ page import="com.atlassian.spring.container.ContainerManager" %> <%@ page import="com.atlassian.confluence.spaces.SpaceManager" %> <%@ page import="com.atlassian.confluence.spaces.Space" %> <%@ page import="com.atlassian.confluence.util.GeneralUtil" %> <%@ page import="com.atlassian.confluence.util.HtmlUtil" %> <%@ page import="org.apache.commons.lang3.StringUtils" %> <%@ page import="com.atlassian.confluence.pages.persistence.dao.filesystem.AttachmentDataFileSystem" %> <%@ page import="com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao" %> <%@ page import="com.atlassian.confluence.pages.persistence.dao.filesystem.HierarchicalMultiStreamAttachmentDataFileSystem" %> <%@ page import="com.atlassian.confluence.pages.persistence.dao.filesystem.TrackingAttachmentDataFileSystem" %> <%@ page import="java.io.File" %> <%@ page import="com.atlassian.fugue.Option" %>
The space key parameter must be supplied
<% } else { SpaceManager spaceManager = (SpaceManager) ContainerManager.getComponent("spaceManager"); Space space = spaceManager.getSpace(spaceKey); if (space == null) { %>No space was found for the key <%= HtmlUtil.htmlEncode(spaceKey) %>
<% } else { FileSystemAttachmentDataDao dao = (FileSystemAttachmentDataDao) ContainerManager.getComponent("fileSystemAttachmentDataDao"); AttachmentDataFileSystem attachmentDataFileSystem = dao.getAttachmentDataFileSystem(); File spaceDir = null; if (attachmentDataFileSystem instanceof TrackingAttachmentDataFileSystem) { AttachmentDataFileSystem delegateAttachmentDataFileSystem = ((TrackingAttachmentDataFileSystem) attachmentDataFileSystem).getDelegate(); if (delegateAttachmentDataFileSystem instanceof HierarchicalMultiStreamAttachmentDataFileSystem) { spaceDir = ((HierarchicalMultiStreamAttachmentDataFileSystem) delegateAttachmentDataFileSystem).getDirectoryForSpace(Option.some(space.getId())); if (spaceDir != null) { %>Attachments for the space <%= HtmlUtil.htmlEncode(space.getName()) %> (key=<%= HtmlUtil.htmlEncode(spaceKey) %>) are stored at -
Your attachment configuration is not supported by this tool.
<% } } } } %>Given a valid space key, this page will provide you with the location on the file system where the attachments for this space are stored.
If this Confluence instance is not using file system attachment storage then this will be indicated.