public String upload ( InputStream content ) throws RedmineException { final URI uploadURI = getURIConfigurator ( ) . getUploadURI ( ) ; final HttpPost request = new HttpPost ( uploadURI ) ; final AbstractHttpEntity entity = new InputStreamEntity ( content , - 1 ) ; /* Content type required by a Redmine */ entity . setContentType ( "application/octet-stream" ) ; request . setEntity ( entity ) ; final String result = getCommunicator ( ) . sendRequest ( request ) ; return parseResponse ( result , "upload" , RedmineJSONParser . UPLOAD_TOKEN_PARSER ) ; }
UPloads content on a server .