code: Observable<ChatResult> sendMessageWithAttachments(@NonNull final String conversationId, @NonNull final MessageToSend message, @Nullable final List<Attachment> attachments) {
  
          final MessageProcessor messageProcessor = attCon.createMessageProcessor(message, attachments, conversationId, getProfileId());
  
          return checkState()
                  .flatMap(client ->
                  {
                      messageProcessor.preparePreUpload(); // convert fom too large message parts to attachments, adds temp upload parts for all attachments
                      return upsertTempMessage(messageProcessor.createTempMessage()) // create temporary message
                              .flatMap(isOk -> attCon.uploadAttachments(messageProcessor.getAttachments(), client)) // upload attachments
                              .flatMap(uploaded -> {
                                  if (uploaded != null && !uploaded.isEmpty()) {
                                      messageProcessor.preparePostUpload(uploaded); // remove temp upload parts, add parts with upload data
                                      return upsertTempMessage(messageProcessor.createTempMessage()); // update message with attachments details like url
                                  } else {
                                      return Observable.fromCallable(() -> true);
                                  }
                              })
                              .flatMap(isOk -> client.service().messaging().sendMessage(conversationId, messageProcessor.prepareMessageToSend()) // send message with attachments details as additional message parts
                                      .flatMap(result -> result.isSuccessful() ? updateStoreWithSentMsg(messageProcessor, result) : handleMessageError(messageProcessor, new ComapiException(result.getErrorBody()))) // update temporary message with a new message id obtained from the response
                                      .onErrorResumeNext(t -> handleMessageError(messageProcessor, t))); // if error occurred update message status list adding error status
                  });
      }
docs: Save and send message with attachments.
  
  @param conversationId Unique conversation id.
  @param message        Message to send
  @param attachments    List of attachments to send with a message.
  @return Observable with Chat SDK result.