Article information
Article relates to
Sitefinity 3.2 SP2
Created by
Yasen Kiprov
Since the release of Sitefinity 3.2 SP2, you are able to add a download link for every file in the folder structure of your web site. Here is how to do it: 1 Open the ~/Sitefinity/Admin/Files.aspx template.
2. In the ManageFiles control, add the showDownloadLink attribute and set it to true:
3. At the bottom of section <MasterTableView>, add this column:
This is what the Files grid should look like after making the above changes: Some of the files, however, cannot be downloaded with a common HTTP request. For instance, files with extensions like .aspx, .ascx and .html will be treated as web pages. Files from folders like App_Data, and App_Master will be restricted. Removing the download links for specific files can be achieved by overriding the IsDownloadable(string filePath) method in the FilesGrid control. By default, the method returns true for any path but it could be altered to return false for the App_Data folder or for the .exe files for instance.