public void addFilePart ( String fieldName , File uploadFile ) throws FileNotFoundException { stream . put ( fieldName , new NamedInputStream ( uploadFile . getName ( ) , new FileInputStream ( uploadFile ) , "binary" , URLConnection . guessContentTypeFromName ( uploadFile . getName ( ) ) ) ) ; }
Adds a file to the request