public void addFilePart(String fieldName,File uploadFile) throws IOException {
  addFilePart(fieldName,uploadFile,URLConnection.guessContentTypeFromName(uploadFile.getName()));
}

public void addFilePart ( String fieldName , File uploadFile ) throws IOException { addFilePart ( fieldName , uploadFile , URLConnection . guessContentTypeFromName ( uploadFile . getName ( ) ) ) ; }
adds an upload file section to the request . mime type of the file is determined based on the file extension .
