Skip to content

Commit

Permalink
Merge pull request silverstripe#18 from kinglozzer/patch-1
Browse files Browse the repository at this point in the history
Add extension point before outputting file
  • Loading branch information
Damian Mooyman committed Nov 19, 2014
2 parents dec6931 + a76e600 commit af6d43e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/SecureFileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public function handleRequest(SS_HTTPRequest $request, DataModel $model) {
$file = new Image();
$file->Filename = $url;
}

$this->extend('onBeforeSendFile', $file);

return $this->sendFile($file);
} else {
if($file instanceof File) {
Expand Down

0 comments on commit af6d43e

Please sign in to comment.