我正在设置一个松弛对话框表单,松弛用户可以在其中将文件添加到对话框表单然后提交。在我的对话框创建中我需要在哪里添加一个字段,所以 slack 会向用户显示一个文件上传字段?
这是我的对话框:
const dialogData = {
token: authToken,
trigger_id: slackReqObj.trigger_id,
response_url: slackReqObj.response_url,
dialog: JSON.stringify({
title: 'Upload a file with comments',
callback_id: 'submit-upload',
submit_label: 'Submit',
elements: [
{
label: 'Description',
type: 'textarea',
name: 'description',
optional: false
},
{
label: 'Title',
type: 'text',
name: 'title',
value: 'title ...',
hint: 'Name of the file or title ...'
}
// here i would like to give the field/option to upload/attach a file
]
})
};