Skip to content

Commit 9eed6cd

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 5d58175 + 6bec573 commit 9eed6cd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/Http/Controllers/ActionlogController.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,18 @@ public function displaySig($filename) : RedirectResponse | Response | bool
3737
}
3838
}
3939

40-
public function getStoredEula($filename) : Response | BinaryFileResponse
40+
public function getStoredEula($filename) : Response | BinaryFileResponse | RedirectResponse
4141
{
4242
$this->authorize('view', \App\Models\Asset::class);
4343
$file = config('app.private_uploads').'/eula-pdfs/'.$filename;
44-
return response()->download($file);
44+
45+
if (Storage::exists($file)) {
46+
return response()->download($file);
47+
}
48+
49+
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
50+
51+
52+
4553
}
4654
}

0 commit comments

Comments
 (0)