fino a eventi e report prima del tipo di eventi

This commit is contained in:
2026-05-26 11:47:36 +02:00
parent 0bed099d05
commit f088dba4bf
47 changed files with 1733 additions and 6899 deletions
+10 -2
View File
@@ -192,11 +192,19 @@ class DocumentoController extends Controller
$fullPath = Storage::disk('local')->path($documento->file_path);
$mimeType = $documento->mime_type;
if (str_starts_with($mimeType, 'image/')) {
$previewableMimeTypes = [
'image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/svg+xml',
'application/pdf',
'text/plain', 'text/html', 'text/csv',
];
if (in_array($mimeType, $previewableMimeTypes)) {
return response()->file($fullPath, ['Content-Type' => $mimeType]);
}
return response()->file($fullPath, ['Content-Type' => $mimeType]);
return response()->view('documenti.preview-fallback', [
'documento' => $documento,
])->header('X-Preview-Fallback', 'true');
}
public function destroy($documento)