cogIntercepts attachment download requests to display contents found inside attached ZIP files
Developed by

XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1


Example 1: Link to an attached Javadoc zip

Imagine that you have a JAR/ZIP file named xwiki-commons-component-api-3.4-javadoc.jar attached to the current page and that it contains some Javadoc (and thus it has an entry page named index.html). You'd create a link to the Javadoc like this:

[[Javadoc>>path:$xwiki.zipexplorer.getFileLink($doc, "xwiki-commons-component-api-3.4-javadoc.jar", "index.html")]]

Example 2: List files in an attachment

The following example lists the files in an attached zip file. The file content may be viewed by clicking on the generated links.

#foreach($file in $plugin.getFileTreeList($doc, $attachment))
 * [[$>>path:$plugin.getFileLink($doc, $attachment, $]]



If you're using XWiki Syntax 2.0 or earlier you'll need to create the link like this instead:

  * {{html}}<a href="$plugin.getFileLink($doc, $attachment, $">$</a>{{/html}}

Prerequisites & Installation Instructions

For this plugin replace:

  • <plugin package> by ccom.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin
  • <plugin name> by zipexplorer

Get Connected