Skip to content

Commit 6f08422

Browse files
committed
#29449: Corrected file size formatting
1 parent ee0dd0f commit 6f08422

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/MediaGalleryUi/Model/GetAssetDetails.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ public function execute(AssetInterface $asset): array
8181
/**
8282
* Format image size
8383
*
84-
* @param int $imageSize
84+
* @param int $size
8585
* @return string
8686
*/
87-
private function formatSize(int $imageSize): string
87+
private function formatSize(int $size): string
8888
{
89-
return $imageSize === 0 ? '' : sprintf('%sKb', $imageSize / 1000);
89+
return $size === 0 ? '' : sprintf('%.2f KB', $size / 1024);
9090
}
9191

9292
/**

0 commit comments

Comments
 (0)