@php
$std_file = $homeworkDetails->file;
$ext = strtolower(str_replace('"]', '', pathinfo($std_file, PATHINFO_EXTENSION)));
$attached_file = str_replace('"]', '', $std_file);
$attached_file = str_replace('["', '', $attached_file);
$preview_files = ['jpg', 'jpeg', 'png', 'heic', 'mp4', 'mov', 'mp3', 'mp4', 'pdf'];
@endphp
@if ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'heic')
 }})
@elseif($ext == 'mp4' || $ext == 'mov')
@elseif($ext == 'mp3')
@elseif($ext == 'pdf')
@endif
@if (!in_array($ext, $preview_files))
{{ $ext }} File Not Previewable.
@endif
@php
$set_filename = time() . '_' . $std_file;
@endphp
@lang('common.download')