Forum Discussion
Images sent via botframework API can not be clicked and enlarged on Teams App
Recently we are building a bot service to send image attachments to a client.
Recently We found that at the client-side the behavior between the browser and Teams APP is different when clicking attachment image.
For clients who use a web browser to talk with our BOT, they can click the attached image and enlarge it to view it. That is a widely used feature especially for the case when our clients want to check the detail of an image.
On the other hand, for clients who use the Teams APP to take with our BOT, attachments can not be clicked and enlarged anymore.
So we are wondering there are two reasons for this problem.
- Our implementation for using bot framework API has some faults.
- The team's APP has some bugs.
We are using the following API to send activities through Bot service to our clients.
https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0#send-to-conversation
Below is the request info for sending activities that contain attachment images to bot framework API.
~~~ REQUEST ~~~
POST /jp/v3/conversations/**********************@thread.tacv2;messageid=*********/activities HTTP/1.1
HOST : smba.trafficmanager.net
HEADERS:
Accept: application/json;charset=utf-8
Authorization: Bearer *********
Content-Type: application/json;charset=utf-8
User-Agent: go-resty/2.3.0 (https://github.com/go-resty/resty)
BODY :
{
"text": "\u003cp\u003e\u003cbr\u003e\u003c/p\u003e",
"type": "message",
"attachments": [
{
"contentType": "image",
"contentUrl": "https://dev.sharepoint.com/sites/*********download.aspx?UniqueId=*********ApiVersion=2.0",
"name": "*********.jpg"
}
]
}
The following screenshot shows that left side image can not be clicked on Teams App.
Does anybody know the reason why this happens?
2 Replies
- C_HedigerCopper Contributor
It seems to be a problem of the desktop client. Within the mobile (iOS) client, i am able to enlarge the image as expected.
- PrakharBirlaCTCopper ContributorWe are facing the same issue. The images sent by the bot API were getting enlarged up till last month, then it suddenly stopped. We are looking for an immediate solution as this is part of a production application in Enterprise customer.