Skip to main content

@slack/web-api / FileBlock

Interface: FileBlock

Defined in: packages/types/dist/block-kit/blocks.d.ts:247

Description​

Displays a remote file. You can't add this block to app surfaces directly, but it will show up when retrieving messages that contain remote files. If you want to add remote files to messages, follow our guide.

See​

File block reference.

Extends​

Properties​

block_id?​

optional block_id?: string;

Defined in: packages/types/dist/block-kit/blocks.d.ts:15

Description​

A string acting as a unique identifier for a block. If not specified, a block_id will be generated. You can use this block_id when you receive an interaction payload to identify the source of the action. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.

Inherited from​

Block.block_id


external_id​

external_id: string;

Defined in: packages/types/dist/block-kit/blocks.d.ts:259

Description​

The external unique ID for this file.


source​

source: string;

Defined in: packages/types/dist/block-kit/blocks.d.ts:255

Description​

At the moment, source will always be remote for a remote file.


type​

type: "file";

Defined in: packages/types/dist/block-kit/blocks.d.ts:251

Description​

The type of block. For a file block, type is always file.

Overrides​

Block.type