mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Extracted download response logic into controller method
Fixes incorrect 'Content-Disposition' header value. Fixes #581
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user