Fisheye/Crucible plugins may define downloadable resources.If your plugin requires Fisheye/Crucible to include additional static files such as images, you will need to use downloadable plugin resources to make them available.You can also serve Javascript and CSS files as downloadable resources, but we recommend that you use Web Resources instead. Web Resources are included in the header of a page and can take advantage of caching (i.e. only download a resource if it has changed) and batching (i.e. serve multiple files in one request).
Please see the Web Resources documentation, if you want to include Javascript or CSS files for download from the header of a page.
Downloadable resources are configured to map a name of some downloadable file to its location within the plugin jar-file.
1 2<resource type="download" name="icn_auto_fav.gif" location="icn_auto_fav.gif"/>
type="download"
content-type
parameter can be used to supply the file's MIME type
content-type
, the application will attempt to guess the file's type from its file extension. For common file extensions, an explicit content-type is not necessary.If your plugin requires a lot of resources, you may wish to expose a directory of files as resources, rather than writing definitions for each individual file.
1 2<resource type="download" name="icons/" location="templates/extra/autofavourite/icons/"/>
icons/small/icn_auto_fav.gif
will be mapped to the resource templates/extra/autofavourite/icons/small/icn_auto_fav.gif
Once declared, the URL for a downloadable resource is as follows:
{server root}/download/resources/{plugin key}:{module key}/{resource name
}
NOTE: {module key}
is optional.
For example:
Rate this page: