cancelUploadingFileMessage method

bool cancelUploadingFileMessage(
  1. String requestId
)

Implementation

bool cancelUploadingFileMessage(String requestId) {
  if (requestId.isEmpty) {
    throw InvalidParameterError();
  }
  final task = _sdk.getUploadTask(requestId);
  if (task == null) {
    throw NotFoundError();
  }

  final queue = _sdk.getMsgQueue(channelUrl);
  _sdk.api.cancelUploadingFile(requestId);
  return queue.cancel(task.hashCode);
}