function convertSize(size) {
   if (size > 1024*1024*1024) {
      return Math.round(size/(1024*1024*1024)*10)/10 + " Gb";
   } else if (size > 1024*1024) {
      size = Math.round(size/(1024*1024)*10)/10+'';
      if(!size.match(/\./)) size += '.0';
      return size + ' Mb';
   } else if(size > 1024) {
      return Math.round(size/1024*10)/10 + " Kb";
   } else {
      return Math.round(size) + " Bytes";
   }
}
