Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | public function handle($file) |
||
41 | { |
||
42 | $upload_path = $this->filemanager->get_upload_destination(); |
||
43 | $file = $this->phpbb_root_path . $upload_path . $file; |
||
44 | |||
45 | if (!file_exists($file)) |
||
46 | { |
||
47 | throw new http_exception(404, 'URL_NOT_FOUND'); |
||
48 | } |
||
49 | |||
50 | return new BinaryFileResponse($file, 200); |
||
51 | } |
||
53 |