Some new stuff.

This commit is contained in:
James Cole 2015-07-25 19:04:39 +02:00
parent f4ade470df
commit 3c2952009e
3 changed files with 6 additions and 1 deletions

View File

@ -124,7 +124,12 @@ class AttachmentController extends Controller
*/
public function preview(Attachment $attachment)
{
$file = public_path('images/image.png');
if($attachment->mime == 'application/pdf') {
$file = public_path('images/page_white_acrobat.png');
} else {
$file = public_path('images/page_green.png');
}
$response = Response::make(File::get($file));
$response->header('Content-Type', 'image/png');

BIN
public/images/page_green.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B