Getting the basic wiring of the importer over into Livewire
WIP: Wiring up more and more of the actions on the importer Files now upload okay, a little glitchy on the display-side though add to readmes so i dont forget
This commit is contained in:
@@ -217,7 +217,7 @@ class Setting extends Model
|
||||
*
|
||||
* @author Mogilev Arseny
|
||||
*/
|
||||
public static function fileSizeConvert($bytes): string
|
||||
public static function fileSizeConvert(int $bytes): string
|
||||
{
|
||||
$result = 0;
|
||||
$bytes = floatval($bytes);
|
||||
@@ -244,6 +244,7 @@ class Setting extends Model
|
||||
],
|
||||
];
|
||||
|
||||
$result = $bytes; // handles the zero case
|
||||
foreach ($arBytes as $arItem) {
|
||||
if ($bytes >= $arItem['VALUE']) {
|
||||
$result = $bytes / $arItem['VALUE'];
|
||||
|
||||
Reference in New Issue
Block a user