]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/AttachmentController.php
Spanish translation
[bookstack] / app / Http / Controllers / AttachmentController.php
index 54e14bfb6f4cd654c7bf7e9c2353432b373c6e6f..74644aa2fd848f0cde64171d3c1e2bd31f2c6c11 100644 (file)
@@ -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());
     }
 
     /**