mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Expanded import routine.
This commit is contained in:
@@ -98,10 +98,14 @@ class AttachmentController extends Controller
|
||||
*/
|
||||
public function download(AttachmentRepositoryInterface $repository, Attachment $attachment)
|
||||
{
|
||||
|
||||
|
||||
if ($repository->exists($attachment)) {
|
||||
$content = $repository->getContent($attachment);
|
||||
$quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\'));
|
||||
|
||||
|
||||
|
||||
/** @var LaravelResponse $response */
|
||||
$response = response($content, 200);
|
||||
$response
|
||||
@@ -149,6 +153,7 @@ class AttachmentController extends Controller
|
||||
{
|
||||
$image = 'images/page_green.png';
|
||||
|
||||
|
||||
if ($attachment->mime == 'application/pdf') {
|
||||
$image = 'images/page_white_acrobat.png';
|
||||
}
|
||||
|
Reference in New Issue
Block a user