Stelle das U0-Fundament mit CMS, Mitgliedern und Filament bereit.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
89b35ac480
commit
2035c46edd
130 files changed
+18519
-50
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
class PublicMediaController extends Controller
|
||||
{
|
||||
public function show(string $path): StreamedResponse
|
||||
{
|
||||
abort_if(str_contains($path, '..') || ! str_starts_with($path, 'cms/'), 404);
|
||||
|
||||
foreach (['media_public', 'cms_incoming'] as $disk) {
|
||||
if (Storage::disk($disk)->exists($path)) {
|
||||
return Storage::disk($disk)->response($path);
|
||||
}
|
||||
}
|
||||
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user