Allowed: {{ $this->fileType === 'image' ? 'JPG, JPEG, PNG' : 'PDF' }} |
Max size: {{ $this->maxSizeKB }} KB
@if($this->fileType === 'image' && $this->validateDimensions)
| Dimensions:
@if($this->width && $this->height)
{{ $this->width }}x{{ $this->height }}px
@endif
@endif
@error('file')
{{ $message }}
@enderror
{{-- Preview for images only --}}
@if ($file && $this->fileType === 'image' && in_array(strtolower($file->getClientOriginalExtension()), ['jpg','jpeg','png']))
@endif
{{-- PDF icon preview --}}
@if ($file && $this->fileType === 'pdf')
@endif
@if ($file)
@endif
@else
{{-- Show uploaded file info with preview --}}
{{-- Thumbnail preview --}}
@php
$previewPath = $this->documents[$this->document_id]['path'];
$previewUrl = asset('storage/' . \Illuminate\Support\Str::after($previewPath, 'public/'));
@endphp
@if($this->fileType === 'image')
{{-- Image thumbnail --}}
@else
{{-- PDF icon --}}
@endif
{{ $this->documents[$this->document_id]['file_name'] }}
@if($this->documents[$this->document_id]['is_delete'])
@endif
@endif
{{-- Old Attachments --}}
@if (!empty($oldAttachments[$document_id]) && count($oldAttachments[$document_id]) > 0)