slack_transfer.functions.upload.upload_file#
- slack_transfer.functions.upload.upload_file(client: UploaderClientABC, old_file_id: str, file_name: str, channel_id: Optional[str] = None, title: Optional[str] = None, filetype: Optional[str] = None, is_slack_post: bool = False, thread_ts: Optional[str] = None) Optional[Tuple[str, str]][source]#
upload a file. This is usually preprocess for posting message attaching files. So, this method is not usually directly used by users.
- Parameters
client (UploaderClientABC) – uploader client. If use this via any UploaderClient Class, self is automatically set. Thus, ignore this.
old_file_id (str) – old file id. This is required to find the file in local data dir.
file_name (str) – file name. It have to be the original old file name. This is also required to find the file in local data dir. The uploaded file is also named as the same.
channel_id (str; Optional; default=None) – channel id (usually 9-digits string)
title (str; Optional; default=None) – title for appending to the file when uploading.
filetype (str; Optional; default=None) – file type. It is not mimetype. See: https://api.slack.com/types/file#types
is_slack_post (bool; Optional; default=False) – set True if this file is slack post.
thread_ts (str; Optional; default=None) – thread ts.