Merge pull request #11752 from dsferruzza/fixes/s3-file-size

Fixed #11742: display correct file sizes when using S3(-like) storage
This commit is contained in:
snipe 2022-08-29 10:08:10 -07:00 committed by GitHub
commit 3527902ba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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>