From 0e9b3c9119e77259ed2f8740ae98e9149936bd51 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 17 Oct 2024 00:27:39 +0100 Subject: [PATCH] Check for existence before trying to get the icon Signed-off-by: snipe --- resources/views/users/view.blade.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 223d525f1d..7821b87402 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -1009,13 +1009,17 @@ @foreach ($user->uploads as $file) - - {{ Helper::filetype_icon($file->filename) }} + @if (Storage::exists('private_uploads/users/'.$file->filename)) + + {{ Helper::filetype_icon($file->filename) }} + @endif @if (($file->filename) && (Storage::exists('private_uploads/users/'.$file->filename))) @if (Helper::checkUploadIsImage($file->get_src('users'))) - + + + @else {{ trans('general.preview_not_available') }} @endif @@ -1044,7 +1048,7 @@ {{ trans('general.download') }} - + @endif