@props([ 'title' => null, 'url' => null, 'mimeType' => null, 'fileSize' => null, ])
{{ $title }} @if($mimeType) {{ $mimeType }} @if($fileSize) · {{ number_format($fileSize / 1_048_576, 1) }} MB @endif @endif
@if($url)
Download
@endif
@if($url && $mimeType) @if(str_starts_with($mimeType, 'image/'))
{{ $title }}
@elseif($mimeType === 'application/pdf') @elseif(str_starts_with($mimeType, 'video/'))
@elseif(str_starts_with($mimeType, 'audio/'))
@elseif(str_starts_with($mimeType, 'text/') || in_array($mimeType, ['application/json', 'application/xml'])) @else
Preview is not available for this file type. Download File
@endif @else
No file available for preview.
@endif