docs: protected Response upload(String name, File fileToUpload, String mediaTypeString, Form formData, URL url) throws IOException {
  
          MediaType mediaType = (mediaTypeString != null ? MediaType.valueOf(mediaTypeString) : null);
          try (FormDataMultiPart multiPart = new FormDataMultiPart()) {
  
              if (formData != null) {
                  MultivaluedMap<String, String> formParams = formData.asMap();
                  formParams.forEach((key, values) -> {
                      if (values != null) {
                          values.forEach(value -> multiPart.field(key, value));
                      }
                  });
              }
  
              FileDataBodyPart filePart = mediaType != null ?
                  new FileDataBodyPart(name, fileToUpload, mediaType) :
                  new FileDataBodyPart(name, fileToUpload);
              multiPart.bodyPart(filePart);
              final Entity<?> entity = Entity.entity(multiPart, Boundary.addBoundary(multiPart.getMediaType()));
              return (invocation(url, null).post(entity));
          }
      }