Fixed #11742: display correct file sizes when using S3(-like) storage

This commit is contained in:
David Sferruzza 2022-08-28 12:07:14 +02:00
parent 96ec96ff7f
commit f60ea9581d
No known key found for this signature in database
GPG key ID: 39B720D9194D378F
4 changed files with 9 additions and 9 deletions

View file

@ -1184,8 +1184,8 @@
<td>
{{ $file->filename }}
</td>
<td data-value="{{ @filesize(storage_path('private_uploads/assets/').$file->filename) }}">
{{ @Helper::formatFilesizeUnits(filesize(storage_path('private_uploads/assets/').$file->filename)) }}
<td data-value="{{ @Storage::size('private_uploads/assets/'.$file->filename) }}">
{{ @Helper::formatFilesizeUnits(Storage::size('private_uploads/assets/'.$file->filename)) }}
</td>
<td>
@if ($file->note)
@ -1277,8 +1277,8 @@
<td>
{{ $file->filename }}
</td>
<td data-value="{{ filesize(storage_path('private_uploads/assetmodels/').$file->filename) }}">
{{ Helper::formatFilesizeUnits(filesize(storage_path('private_uploads/assetmodels/').$file->filename)) }}
<td data-value="{{ Storage::size('private_uploads/assetmodels/'.$file->filename) }}">
{{ Helper::formatFilesizeUnits(Storage::size('private_uploads/assetmodels/'.$file->filename)) }}
</td>
<td>
@if ($file->note)

View file

@ -469,8 +469,8 @@
<td>
{{ $file->filename }}
</td>
<td data-value="{{ filesize(storage_path('private_uploads/licenses/').$file->filename) }}">
{{ Helper::formatFilesizeUnits(filesize(storage_path('private_uploads/licenses/').$file->filename)) }}
<td data-value="{{ Storage::size('private_uploads/licenses/'.$file->filename) }}">
{{ Helper::formatFilesizeUnits(Storage::size('private_uploads/licenses/'.$file->filename)) }}
</td>
<td>

View file

@ -154,8 +154,8 @@
<td>
{{ $file->filename }}
</td>
<td data-value="{{ filesize(storage_path('private_uploads/assetmodels/').$file->filename) }}">
{{ Helper::formatFilesizeUnits(filesize(storage_path('private_uploads/assetmodels/').$file->filename)) }}
<td data-value="{{ Storage::size('private_uploads/assetmodels/'.$file->filename) }}">
{{ Helper::formatFilesizeUnits(Storage::size('private_uploads/assetmodels/'.$file->filename)) }}
</td>
<td>
@if ($file->note)

View file

@ -842,7 +842,7 @@
{{ $file->filename }}
</td>
<td>
{{ Helper::formatFilesizeUnits(filesize(storage_path('private_uploads/users/').$file->filename)) }}
{{ Helper::formatFilesizeUnits(Storage::size('private_uploads/users/'.$file->filename)) }}
</td>
<td>