diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index d96fbf9690d25fb2061177f7b75242761fbe9ca8..c8402db932c83db9f2dc699163b797171c74d3ad 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -4678,16 +4678,16 @@ $(function () { $.each(this.files, function () { var unit = 'KB'; var size = 0; - if (this.size < 1024) { + var kb = this.size / 1024; + if (kb < 1024) { unit = 'KB'; - size = Math.round((this.size / 1024) * 100) / 100; - } else if (this.size < 1024 * 1024) { + size = Math.round(kb * 100) / 100; + } else if (kb < 1024 * 1024) { unit = 'MB'; size = Math.round((this.size / (1024 * 1024)) * 100) / 100; - } else if (this.size < 1024 * 1024 * 1024) { + } else if (kb < 1024 * 1024 * 1024) { unit = 'GB'; size = Math.round((this.size / (1024 * 1024 * 1024)) * 100) / 100; - } fileNames += '' + this.name + ' (' + size + unit + ')'; });