We're using the Web Chat Channel in Microsoft's Bot Framework,and we don't want to use the attachment icon.
How can we hide and disable attachments so end users don't accidentally click it or get confused?
We're using the Web Chat Channel in Microsoft's Bot Framework,and we don't want to use the attachment icon.
How can we hide and disable attachments so end users don't accidentally click it or get confused?
Are you currently consuming the WebChat via an iFrame or via the JavaScript implementation? Integrating via JavaScript will give you moderate styling and customizability options.
By modifying the styleOptions
object passed into the renderer, you can disable the upload button with minimal effort.
Sample - Disable the Upload Button
The implementation above doesn't prevent the users from sending attachments to the bot, it will just disable the upload button. In the Azure Bot Service, you could also Block attachment upload from user
in the DirectLine settings to disallow attachments on the service.
To disable the upload functionality: