diff --git a/app/SongComposer.php b/app/SongComposer.php index 3038576..98a124a 100644 --- a/app/SongComposer.php +++ b/app/SongComposer.php @@ -318,7 +318,7 @@ public function vote(string $key, User $user, int $direction): bool /** * @param $key * - * @return \Symfony\Component\HttpFoundation\BinaryFileResponse + * @return \Illuminate\Http\RedirectResponse */ public function serveFileDownload($key) { @@ -327,7 +327,7 @@ public function serveFileDownload($key) // @todo stop/prevent download count faking if ($downloadCount = SongDetail::where('id', $split['detailId'])->where('song_id', $split['songId'])->increment('download_count', 1)) { Cache::tags(['song-' . $split['songId']])->increment("downloads-{$split['detailId']}", 1); - return \response()->download(storage_path("app/public/songs") . "/{$split['songId']}/{$split['songId']}-{$split['detailId']}.zip"); + return \response()->redirectTo(asset("storage/songs/{$split['songId']}/{$split['songId']}-{$split['detailId']}.zip")); } return abort(404);