Send File/Image type attachment from user to bot on Teams group chat through Composer
We are trying to upload attachment from user to bot developed using bot composer. While trying to read the content url of the attachment uploaded through teams group chat, we do not get any content url. The content url appears blank. Kindly suggest. Below is the snippet : { "contentType": "text/html", "contentUrl": null, "content": " "<img" "itemscope="png"", "src="https://us-api.asm.skype.com/v1/objects/0-eus-d7-6aaf03b8f4c12140b9d0d5ee35522c33/views/imgo"" "alt="image"", "itemtype="http://schema.skype.com/AMSImage"" "width="444.44444444444446"", "height="250"" "id="x_0-eus-d7-6aaf03b8f4c12140b9d0d5ee35522c33"", "itemid="0-eus-d7-6aaf03b8f4c12140b9d0d5ee35522c33"" "style="vertical-align:bottom">", ", " "name": null, "thumbnailUrl": null } ] }" }
@SwetalinaGitHub, unfortunately I am unable to repro the issue you are encountering. Are you able to provide details on how you setup the attachment file input in your dialog (properties you filled out, etc.) or a copy of your bot that I can test against?
@stevkan Below is the screenshot of the dialog in composer. Also sharing the screenshot of object files while testing the bot through personal scope and group chat scope respectively.
Through the same bot composer solution, image upload is working properly through personal scope and we get the object of the image. While it does not work in the group scope.

@SwetalinaGitHub, thank you for your patience. I am still unable to repro the issue.
Can you tell me what version of Composer you are running? Is this a C# or JS build for your bot? And, the image you are attempting to send, what is the size of the image file? Are any other errors reported in Composer either under Problems or Output?
Even I am facing the same issue. Sometimes content URL is blank in the teams and sometimes it works fine. I am using bot composer 2.0.0. (Windows OS) , C#, I tried pdf, word document but was not able to find the pattern when it's failing and when it's passing.
The only thing for sure is when a word document has "+" in the name it's failing all the time but without it also it fails sometimes.


@stevkan Were you able to reproduce the issue?
@stevkan Could you please provide an update to this issue?
@shrutinehra, apologies for the delay and thank you for your patience. I am now able to repro the issue. When sending a Word doc where the file name ends with a '+', the file's content information is not being added to the Attachments array. However, when the file name is just alphanumerics, the file's content information is added. I've only tested a handful of times; at this point, the outcome has been consistent in each case.
I'm going to dig deeper into this to see if I can isolate the cause. I will update you when I know more.
Testing a JS SDK bot via Teams produced the same results. However, testing in Emulator, Test in Web Chat, and Web Chat (hosted on a web app) all functioned correctly when using either a Composer bot or a JS SDK bot.
Did additional testing by running Fiddler and monitoring requests/responses. Sent attachments in Teams and could see them in the responses for both messages sent to and not to a bot. However, that only displays the attachments as they were sent between the client and the Teams server. Not surprisingly, as the connection between the Teams server and the Teams connector in ABS is not visible, I am unable to determine if the issue lies on the Teams side or the ABS side.
@clearab, could you take a look at this or connect this to the right Teams person to handle?
I believe there might be two issues happening here - an encoding issue with file names including some special characters, and also that sending/receiving files in Teams is only support in the personal scope. Do those two issues account for the failures y'all are seeing, or is there another case to be aware of?
More info on sending/receiving files in Teams can be found here: https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bots-filesv4
Closing this one due to inactivity, @SwetalinaGitHub feel free to re-open this issue if you still experience problems.