class_docstr: Send a file to a Slack channel.
  
  .. code-block:: python
  
      # Send file with filename and filetype
      slack_operator_file = SlackAPIFileOperator(
          task_id="slack_file_upload_1",
          dag=dag,
          slack_conn_id="slack",
          channels="#general,#random",
          initial_comment="Hello World!",
          filename="/files/dags/test.txt",
          filetype="txt",
      )
  
      # Send file content
      slack_operator_file_content = SlackAPIFileOperator(
          task_id="slack_file_upload_2",
          dag=dag,
          slack_conn_id="slack",
          channels="#general",
          initial_comment="Hello World!",
          content="file content in txt",
      )
  
  :param channels: Comma-separated list of channel names or IDs where the file will be shared.
      If set this argument to None, then file will send to associated workspace. (templated)
  :param initial_comment: message to send to slack. (templated)
  :param filename: name of the file (templated)
  :param filetype: slack filetype. (templated) See: https://api.slack.com/types/file#file_types
  :param content: file content. (templated)
  :param title: title of file. (templated)
  :param channel: (deprecated) channel in which to sent file on slack name
code: def __init__(
      self,
      channels: str | Sequence[str] | None = None,
      initial_comment: str | None = None,
      filename: str | None = None,
      filetype: str | None = None,
      content: str | None = None,
      title: str | None = None,
      channel: str | None = None,
      **kwargs,
  ) -> None:
      if channel:
          warnings.warn(
              "Argument `channel` is deprecated and will removed in a future releases. "
              "Please use `channels` instead.",
              AirflowProviderDeprecationWarning,
              stacklevel=2,
          )
          if channels:
              raise ValueError(
                  f"Cannot set both arguments: channel={channel!r} and channels={channels!r}."
              )
          channels = channel
  
      self.channels = channels
      self.initial_comment = initial_comment
      self.filename = filename
      self.filetype = filetype
      self.content = content
      self.title = title
      super().__init__(method="files.upload", **kwargs)
  
imports: from __future__ import annotations
  import json
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Sequence
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.models import BaseOperator
  from airflow.providers.slack.hooks.slack import SlackHook
label_desc: Use image node_id 1 to create a new SlackAPIFileOperator object from inherited base classes: SlackAPIOperator with example: obj = SlackAPIFileOperator(channels, initial_comment, filename, filetype, content, title, channel)