Expanded import routine.

This commit is contained in:
James Cole
2017-06-14 20:13:19 +02:00
parent b304284d70
commit 7cc24417b3
15 changed files with 426 additions and 230 deletions

View File

@@ -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';
}