public function formatFilesize($size)
        {
            $kb = 1024;
            $mb = 1048576;
            $gb = 1073741824;
            $tb = 1099511627776;

            if ($size < $kb) {
                return $size . " B";
            } else if ($size < $mb) {
                return round($size / $kb, 2) . " KB";
            } else if ($size < $gb) {
                return round($size / $mb, 2) . " MB";
            } else if ($size < $tb) {
                return round($size / $gb, 2) . " GB";
            } else {
                return round($size / $tb, 2) . " TB";
            }
        }