code: private long getTotalUploadSize() throws IOException {
          long size = 0;
          for (Map.Entry<String, File> entry : files.entrySet()) {
              size += entry.getValue().length();
          }
  
          for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) {
              size += entry.getValue().available();
          }
          return size;
      }
docs: used for upload progress