Fix math on human filesize to match the relays page
This commit is contained in:
parent
30ffd1089c
commit
6fb202d559
@ -8,8 +8,8 @@ function humanByteSize(input) {
|
|||||||
return '0 B';
|
return '0 B';
|
||||||
}
|
}
|
||||||
|
|
||||||
const i = Math.floor(Math.log(input) / Math.log(1024));
|
const i = Math.floor(Math.log(input) / Math.log(1000));
|
||||||
return (input / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i];
|
return (input / Math.pow(1000, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert seconds to human friendly time, with days
|
// Convert seconds to human friendly time, with days
|
||||||
|
Loading…
Reference in New Issue
Block a user