public void addFilePart ( final String fieldName , final URL urlToUploadFile ) throws IOException { // // Maybe try and extract a filename from the last part of the url? // Or have the user pass it in? // Or just leave it blank as I have already done? // addFilePart ( fieldName , urlToUploadFile . openStream ( ) , null , URLConnection . guessContentTypeFromName ( urlToUploadFile . toString ( ) ) ) ; }
Adds a upload file section to the request by url stream