Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 11, 2024
2 parents 5d58175 + 6bec573 commit 9eed6cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/Http/Controllers/ActionlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,18 @@ public function displaySig($filename) : RedirectResponse | Response | bool
}
}

public function getStoredEula($filename) : Response | BinaryFileResponse
public function getStoredEula($filename) : Response | BinaryFileResponse | RedirectResponse
{
$this->authorize('view', \App\Models\Asset::class);
$file = config('app.private_uploads').'/eula-pdfs/'.$filename;
return response()->download($file);

if (Storage::exists($file)) {
return response()->download($file);
}

return redirect()->back()->with('error', trans('general.file_does_not_exist'));



}
}

0 comments on commit 9eed6cd

Please sign in to comment.