code: protected UploadFile convertUploadFile(File file) {
          Date lastModifiedDate = new Date();
          // Avoid parsing error on last modified date
          if (file.lastModifiedDate != null && !file.lastModifiedDate.isEmpty()) {
              lastModifiedDate = new Date(file.lastModifiedDate);
          }
          return new UploadFile(file.name, lastModifiedDate, Double.parseDouble(file.size), file.type);
      }
docs: Converts a Native File Object to Upload File object