【问题标题】:Ability to receive files with the MS bot framework能够使用 MS bot 框架接收文件
【发布时间】:2016-07-20 20:45:26
【问题描述】:

我在这方面可能有点早,但是否也可以使用新的 Microsoft Bot Framework 接收文件(主要通过 Skype)?
我在文档中找不到任何内容。

【问题讨论】:

    标签: c# botframework


    【解决方案1】:

    我在Microsoft.Bot.Connector.Message 类中找到了IList<Microsoft.Bot.Connector.Attachment> Attachments

    foreach (var attachment in message.Attachments)
    {
        var content = attachment.Content; // I think the content of uploaded file here.
    }
    

    虽然没有文档,很遗憾。


    更新(2016 年 4 月 1 日)

    我用模拟器做了一个快速测试

    您可以在模拟器中清楚地看到 API 的响应。

    【讨论】:

    【解决方案2】:

    您可以在此处找到有关附件的一些文档:

    http://docs.botframework.com/connector/message-content/#attachments

    您还可以使用“ChannelData”字段来利用电子邮件和 Slack 提供的一些特殊功能:

    http://docs.botframework.com/connector/custom-channeldata/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-09
      • 2016-10-20
      • 2018-02-25
      相关资源
      最近更新 更多