Merge pull request #12121 from snipe/fixes/safer_file_existance_checking_for_model_files

Replace error suppression with better logic
This commit is contained in:
snipe 2022-11-15 17:43:39 +00:00 committed by GitHub
commit 5103f28598
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1301,8 +1301,8 @@
<del>{{ $file->filename }}</del>
@endif
</td>
<td data-value="{{ (Storage::exists('private_uploads/assetmodels/'.$file->filename) ? Storage::size('private_uploads/assetmodels/'.$file->filename) : '') }}">
{{ Helper::formatFilesizeUnits(@Storage::size('private_uploads/assetmodels/'.$file->filename)) }}
<td data-value="{{ (Storage::exists('private_uploads/assetmodels/'.$file->filename)) ? Storage::size('private_uploads/assetmodels/'.$file->filename) : '' }}">
{{ (Storage::exists('private_uploads/assetmodels/'.$file->filename)) ? Helper::formatFilesizeUnits(Storage::size('private_uploads/assetmodels/'.$file->filename)) : '' }}
</td>
<td>
@if ($file->note)