code: public void addFilePart(final String fieldName, final File uploadFile)
          throws IOException
      {
          String fileName = uploadFile.getName();
  
          addFilePart(fieldName, new FileInputStream(uploadFile), fileName, URLConnection.guessContentTypeFromName(fileName));
      }
docs: Adds a upload file section to the request
  @param fieldName name attribute in &lt;input type="file" name="..." /&gt;
  @param uploadFile a File to be uploaded
  @throws IOException if problems