Search code examples
botframeworkdirect-line-botframeworkweb-chat

is there a way to remove the file attach icon in webchat?


sample

i am looking for a way to remove this icon which is highlighted in the picture.

Additional information:

using webchat 4.8

implementing in an angular project.


Solution

  • Yes, you can pass in the hideUploadButton: true in styleOptions. Then pass that is to the Web Chat renderer. For a full list of styleOptions parameters, reference this file.

    const styleOptions = {
      hideUploadButton: true,
    }
    
    [ ... ]
    
    window.WebChat.renderWebChat(
      {
        directLine: window.WebChat.createDirectLine( {
          token: token
        } ),
        styleOptions: styleOptions
      document.getElementById( 'webchat' )
    );
    

    Hope of help!