Skip to content

Firefly III: a personal finances manager

Some new stuff.

James Cole3c2952009e4c
diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php
index c2545c41e9..fe4a03b7bc 100644
--- a/app/Http/Controllers/AttachmentController.php
+++ b/app/Http/Controllers/AttachmentController.php
@@ -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');
diff --git a/public/images/page_green.png b/public/images/page_green.png
new file mode 100755
index 0000000000..de8e003f9f
Binary files /dev/null and b/public/images/page_green.png differ
diff --git a/public/images/page_white_acrobat.png b/public/images/page_white_acrobat.png
new file mode 100755
index 0000000000..8f8095e46f
Binary files /dev/null and b/public/images/page_white_acrobat.png differ