fix rendering suffix for >1GB images

This commit is contained in:
Daniele Franceschi 2018-03-26 14:48:13 +02:00 committed by GitHub
parent 0c95bd6ffa
commit 71eeebec6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,7 +442,7 @@ export class TagComponent implements OnInit, AfterViewInit {
} else if (Math.pow(1024, 2) <= size && size < Math.pow(1024, 3)) {
return (size / Math.pow(1024, 2)).toFixed(2) + "MB";
} else if (Math.pow(1024, 3) <= size && size < Math.pow(1024, 4)) {
return (size / Math.pow(1024, 3)).toFixed(2) + "MB";
return (size / Math.pow(1024, 3)).toFixed(2) + "GB";
} else {
return size + "B";
}