1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

My librarys (#2584)

This commit is contained in:
杨顺强
2018-11-30 17:18:41 +08:00
committed by Daniel Pan
parent ef3a1407a3
commit 4880622795
15 changed files with 550 additions and 26 deletions

View File

@@ -297,10 +297,10 @@ export const Utils = {
var bytes = options.bytes;
var precision = options.precision || 0;
var kilobyte = 1024;
var megabyte = kilobyte * 1024;
var gigabyte = megabyte * 1024;
var terabyte = gigabyte * 1024;
var kilobyte = 1000;
var megabyte = kilobyte * 1000;
var gigabyte = megabyte * 1000;
var terabyte = gigabyte * 1000;
if ((bytes >= 0) && (bytes < kilobyte)) {
return bytes + ' B';