Plugin Interfaces > Static Files > IPluginStaticFile
Introduction
This article will demonstrate a simple FogBugz plugin that implements the IPluginStaticFile interface contained in the FogCreek.FogBugz.Plugins.Interfaces class library. See also the related articles: Implementing IPluginJS and Implementing IPluginStaticCSS
Functionality
This plugin will provide download links for several static files via its plugin page. the file list is stored in a dictionary along with the visibility/permissions for each. Static files like these are commonly used for images and this plugin uses another set of static files to serve as icons next to the links to the main files. In order to include the files in the plugin's /static/ directory, a parent directory including the plugin assembly DLL and a sibling "static" folder containing the files was zipped up and uploaded to FogBugz. The .zip file is inlcuded at the bottom of this article as an attachment
A link to the plugin page is provided in the Extras menu (see Implementing IPluginExtrasMenu)
The resulting file list. Clicking the first two links as user "John Doe" (who is a normal user) downloads the files. Clicking the third results in an empty file.
Compile and Install It On Your Own
Download the source file: IPluginStaticFile_Example.cs
Put these images in a folder named "static" and zip it alongside your dll when installing static.zip
Then follow these instructions to create a functioning plugin assembly: Compiling and Installing a FogBugz Plugin