files_upload: Uploads or creates a file.

View source: R/files.R

files_uploadR Documentation

Uploads or creates a file.

Description

Uploads or creates a file.

Usage

files_upload(
  token = Sys.getenv("SLACK_TOKEN"),
  channels = NULL,
  content = NULL,
  file = NULL,
  filename = NULL,
  filetype = NULL,
  initial_comment = NULL,
  thread_ts = NULL,
  title = NULL,
  return_response = F
)

Arguments

token

Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.

channels

Comma-separated list of channel names or IDs where the file will be shared.

content

File contents via a POST variable. If omitting this parameter, you must provide a file.

file

File contents via multipart/form-data. If omitting this parameter, you must submit content.

filename

Filename of file.

filetype

A file type identifier.

initial_comment

The message text introducing the file in specified channels.

title

Title of file.

return_response

Whether or not to return the API call response as opposed to the response body. Defaults to FALSE (return response body)

Provide

another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.

Value

The details of the uploaded file.

See Also

https://api.slack.com/methods/files.upload


samterfa/slackme documentation built on April 11, 2022, 3:29 a.m.