code: public Attachment uploadAttachment(String fileName, String contentType,
  			InputStream content) throws RedmineException, IOException {
  		final InputStream wrapper = new MarkedInputStream(content,
  				"uploadStream");
  		final String token;
  		try {
  			token = transport.upload(wrapper);
  			final Attachment result = new Attachment();
  			result.setToken(token);
  			result.setContentType(contentType);
  			result.setFileName(fileName);
  			return result;
  		} catch (RedmineException e) {
  			unwrapIO(e, "uploadStream");
  			throw e;
  		}
  	}
docs: Uploads an attachement.
  
  @param fileName
  file name of the attachement.
  @param contentType
  content type of the attachement.
  @param content
  attachement content stream.
  @return attachement content.
  @throws RedmineException
  if something goes wrong.
  @throws IOException
  if input cannot be read. This exception cannot be thrown yet
  (I am not sure if http client can distinguish "network"
  errors and local errors) but is will be good to distinguish
  reading errors and transport errors.