\DownloadableFileController
Core controller responsible for determining if the current user can download the file selected.
A lot of this code is taken and modified from the "secure asssts"
Silverstripe Module
Synopsis
class DownloadableFileController
extends Controller
{
- // members
- private static array $admin_permissions = ;
- private static integer $min_download_bandwidth = 50;
- // methods
- public void handleRequest()
- public void sendFile()
- public Boolean canDownloadFile()
- public void hasAccess()
Hierarchy
Extends
- Controller
Members
private
- $admin_permissions
- $min_download_bandwidth
Methods
public
- canDownloadFile() — Determine if the file we found can be downloaded or not
- handleRequest() — Process all incoming requests passed to this controller, checking that the file exists and passing the file through if possible.
- hasAccess()
- sendFile() — Output file to the browser.