Allowed: {{ $this->fileType === 'image' ? 'JPG, JPEG, PNG' : ($this->fileType === 'pdf' ? 'PDF' : 'PDF, JPG, JPEG, PNG') }} |
Max size: {{ $this->maxSizeKB }} KB
@if(($this->fileType === 'image' || $this->fileType === 'pdf-or-image') && $this->validateDimensions)
| Dimensions:
@if($this->width && $this->height)
{{ $this->width }}x{{ $this->height }}px
@endif
@endif
@error('file')
{{ $message }}
@enderror
{{-- Preview for selected images only --}}
@if ($file && in_array(strtolower($file->getClientOriginalExtension()), ['jpg','jpeg','png']))
@endif
{{-- PDF icon preview --}}
@if ($file && strtolower($file->getClientOriginalExtension()) === 'pdf')
@endif
@if ($file)
@endif
@else
{{-- Show uploaded file info with preview --}}
{{-- Thumbnail preview --}}
@php
$previewPath = $this->documents[$this->document_id]['path'];
$previewExtension = strtolower(pathinfo($previewPath, PATHINFO_EXTENSION));
$previewIsImage = in_array($previewExtension, ['jpg','jpeg','png']);
$previewFile = urlencode(
Crypt::encryptString(
Str::after($previewPath, 'public/')
)
);
@endphp
@if($previewIsImage)
@else
@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)