code: public Attachment uploadAttachment(String contentType, File content)
              throws RedmineException, IOException {
          try (InputStream is = new FileInputStream(content)) {
              return uploadAttachment(content.getName(), contentType, is, content.length());
          }
      }
docs: Uploads an attachment.
  
  @param contentType
  content type of the attachment.
  @param content
  attachment content stream.
  @return attachment content.
  @throws RedmineException
  if something goes wrong.
  @throws IOException
  if input cannot be read.