Skip to content

Commit

Permalink
Merge pull request #11752 from dsferruzza/fixes/s3-file-size
Browse files Browse the repository at this point in the history
Fixed #11742: display correct file sizes when using S3(-like) storage
  • Loading branch information
snipe committed Aug 29, 2022
2 parents 96ec96f + f60ea95 commit 3527902
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions resources/views/hardware/view.blade.php
Expand Up @@ -1184,8 +1184,8 @@ class="table table-striped snipe-table"
<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)
Expand Down Expand Up @@ -1277,8 +1277,8 @@ class="table table-striped snipe-table"
<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)
Expand Down
4 changes: 2 additions & 2 deletions resources/views/licenses/view.blade.php
Expand Up @@ -469,8 +469,8 @@ class="table table-striped snipe-table"
<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>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/models/view.blade.php
Expand Up @@ -154,8 +154,8 @@ class="table table-striped snipe-table"
<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)
Expand Down
2 changes: 1 addition & 1 deletion resources/views/users/view.blade.php
Expand Up @@ -842,7 +842,7 @@ class="table table-striped snipe-table"
{{ $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>
Expand Down

0 comments on commit 3527902

Please sign in to comment.