Attach .txt, .pdf or zip file with skype bot using botframework rest-api

怎甘沉沦 提交于 2019-12-13 19:16:39

问题


I was trying to attach .txt and .pdf file to skype bot using rest-api but got this error:

{
"error": {
    "code": "BadArgument",
    "message": "Unknown attachment type"
}

}

Meanwhile I found Rest API attachment error, can anyone confirm if pdf or text file attachment are restricted or not as there is no clear declaration in their api? I tried with this format:

 {
    "type": "message",

   "recipient": {
        "id": "xxxxxxxJ0niMZOII93xxxxL1E"
    },
    "text": "Here's a picture of the duck I was telling you about.",
    "attachments": [
        {
          "contentType": "application/pdf",
          "contentUrl": "myfileurl",
          "name": "filename.pdf"
        }
    ]
}

Thanks in advance.


回答1:


Sending attachments such as PDFs is not supported in bots yet due to security concerns. Skype can only send media attachments such as audio and video.

You can refer it here



来源:https://stackoverflow.com/questions/50963306/attach-txt-pdf-or-zip-file-with-skype-bot-using-botframework-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!