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