X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3ac34b584930aad5625d29ca6c2e59b85e9d2ef8..refs/pull/1462/head:/app/Http/Controllers/AttachmentController.php diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 54e14bfb6..0289f8e1d 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -1,10 +1,10 @@ attachmentService->getAttachmentFromStorage($attachment); - return response($attachmentContents, 200, [ - 'Content-Type' => 'application/octet-stream', - 'Content-Disposition' => 'attachment; filename="'. $attachment->getFileName() .'"' - ]); + return $this->downloadResponse($attachmentContents, $attachment->getFileName()); } /**