Skip to main content

@slack/types / FileInput

Interface: FileInput

Defined in: block-kit/block-elements.ts:195

Description​

Allows user to upload files. In order to use the file_input element within your app, your app must have the files:read scope.

See​

File input element reference.

Extends​

Properties​

action_id?​

optional action_id?: string;

Defined in: block-kit/extensions.ts:15

@description: An identifier for this action. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other action_ids in the containing block. Maximum length for this field is 255 characters.

Inherited from​

Actionable.action_id


filetypes?​

optional filetypes?: string[];

Defined in: block-kit/block-elements.ts:205

Description​

An array of valid file extensions that will be accepted for this element. All file extensions will be accepted if filetypes is not specified. This validation is provided for convenience only, and you should perform your own file type validation based on what you expect to receive.


max_files?​

optional max_files?: number;

Defined in: block-kit/block-elements.ts:210

Description​

Maximum number of files that can be uploaded for this file_input element. Minimum of 1, maximum of 10. Defaults to 10 if not specified.


type​

type: "file_input";

Defined in: block-kit/block-elements.ts:199

Description​

The type of element. In this case type is always file_input.

Overrides​

Actionable.type