code: public Attachment uploadAttachment(String fileName, String contentType,
                                         byte[] content) throws RedmineException, IOException {
          final InputStream is = new ByteArrayInputStream(content);
          try {
              return uploadAttachment(fileName, contentType, is, content.length);
          } finally {
              try {
                  is.close();
              } catch (IOException e) {
                  throw new RedmineInternalError("Unexpected exception", e);
              }
          }
      }
docs: Uploads an attachment.
  
  @param fileName
  file name of the attachment.
  @param contentType
  content type of the attachment.
  @param content
  attachment content stream.
  @return attachment content.
  @throws RedmineException
  if something goes wrong.
  @throws java.io.IOException
  if input cannot be read.