Search code examples
c#botframework

How to receive attachments from users


How do I receive an attachment from a user? I've tried iterating through the Attachment object to extract the content of attachments, but it's always null:

foreach(var item in message.Attachment) { var content = item.Content; }

How can I get attachments from users are prompting them for one?


Solution

  • Take a look to the Receive Attachment sample. There you will find the code required to access to the attachments sent by the users.