JDBC Driver for Slack

Build 24.0.9060

UploadFile

To upload a file.

Stored Procedure Specific Information

Slack allows only a small subset of columns to be used in the Exec query. These columns can typically be used with only = comparison. The required scopes to execute this SP are files:write, files:write:user and files:read. For example:

EXECUTE UploadFile FullPath = 'D:\Desktop\Test.png', Size = '10', Title = 'Test title', ChannelId = 'D064Q184VGA'

Note: If you don't use the channel_id parameter, this only uploads the file — hosting the file in Slack — but doesn't share the file anywhere. Crucially, only the uploader will have access to the file if it is not shared anywhere. This SP will not support large files upload.

Input

Name Type Accepts Input Streams Description
FileName String False Name of the file being uploaded.
FullPath String False The full path to the file to upload.
Size Long False Size in bytes of the file being uploaded.
AltTxt String False Description of image for screen-reader.
SnippetType String False Syntax type of the snippet being uploaded.
Title String False Title of the file.
ChannelId String False Channel ID where the file will be shared. If not specified the file will be private.
InitialComment String False The message text introducing the file in specified channels.
ThreadTs String False Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.
Content String True The content as InputStream to be uploaded when FullPath is not specified.

Result Set Columns

Name Type Description
Success String The result of the procedure.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060