code: protected Response putUpload(String name, File fileToUpload, URL url) throws IOException {
  
          try (MultiPart multiPart = new FormDataMultiPart()) {
              multiPart.bodyPart(new FileDataBodyPart(name, fileToUpload, MediaType.APPLICATION_OCTET_STREAM_TYPE));
              final Entity<?> entity = Entity.entity(multiPart, Boundary.addBoundary(multiPart.getMediaType()));
              return (invocation(url, null).put(entity));
          }
      }
docs: Perform a file upload using multipart/form-data using the HTTP PUT method, returning
  a ClientResponse instance with the data returned from the endpoint.
  
  @param name the name for the form field that contains the file name
  @param fileToUpload a File instance pointing to the file to upload
  
  @param url the fully formed path to the GitLab API endpoint
  @return a ClientResponse instance with the data returned from the endpoint
  @throws IOException if an error occurs while constructing the URL