code: public static Attachment writeAttachment(byte[] attachment, String title) throws IOException {
          String type = getDefaultMimeTypes().detect(new ByteArrayInputStream(attachment), new Metadata()).toString();
          return writeAttachment(attachment, title, type);
      }
docs: Write attachment without specified type. Using {@link org.apache.tika.mime.MimeTypes#detect}
  to autodetect attachment type from attachment content.
  
  @param attachment to write
  @param title      attachment title
  @return Created {@link ru.yandex.qatools.allure.model.Attachment}
  @throws IOException if can't write attachment