Revert back to output() and outputThumb() methods

Adds a default false flag to enable the new behaviour of returning responses instead.
This commit is contained in:
Luke Towers 2019-01-16 12:27:07 -06:00
parent 743c74643a
commit cc84c7cf7a
1 changed files with 5 additions and 4 deletions

View File

@ -26,7 +26,7 @@ class Files extends Controller
public function get($code = null)
{
try {
return $this->findFileObject($code)->getHttpResponse();
return $this->findFileObject($code)->output('inline', true);
}
catch (Exception $ex) {}
@ -39,10 +39,11 @@ class Files extends Controller
public function thumb($code = null, $width = 100, $height = 100, $mode = 'auto', $extension = 'auto')
{
try {
return $this->findFileObject($code)->getThumbHttpResponse(
return $this->findFileObject($code)->outputThumb(
$width,
$height,
compact('mode', 'extension')
compact('mode', 'extension'),
true
);
}
catch (Exception $ex) {}
@ -134,4 +135,4 @@ class Files extends Controller
return $file;
}
}
}