Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
nasrulhazim authored and github-actions[bot] committed Oct 25, 2022
1 parent afdccb1 commit 20ef800
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Http/Controllers/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public function __invoke(Request $request, string $type, string $uuid)

abort_if($request->user()->cannot($type, $media), 403, 'Unauthorized Access.');

if($type == MediaAccess::view()->value || $type == MediaAccess::stream()->value) {
if ($type == MediaAccess::view()->value || $type == MediaAccess::stream()->value) {
return response()->make(file_get_contents($media->getPath()), 200, [
'Content-Type' => $media->mime_type,
'Content-Disposition' => 'inline; filename="'.$media->file_name.'"'
'Content-Disposition' => 'inline; filename="'.$media->file_name.'"',
]);
}

if($type == MediaAccess::download()->value) {
if ($type == MediaAccess::download()->value) {
return response()->download($media->getPath());
}

Expand Down

0 comments on commit 20ef800

Please sign in to comment.