-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bot cannot access images added by clipboard #1561
Comments
Hi joshamil! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out. Best regards, Teams Platform |
@joshamil , MS teams framework treat attachment object and clipboard image differently.
Here is a sample c# code to get the image form MS Teams URL and save it to solution file. You can add this logic in ActivityHandler method.
|
Thank you @Subhasish-msft for your great explanation and the code sample! Now it works as intended :) |
Hi there,
I am working on a bot which receives messages from Teams via the Botframework and sends them to another application. I'm using .NET Core.
When sending a normal file, I can access it with the Attachment.Content["downloadUrl"] of the activity which I receive from the Botframework.
But when I insert images from the clipboard, it is stored in another way, with the Activity I get two attachments with different urls (one for layout and one for the image resource, I suppose?), like the image below, but when trying to GET the image, I receive an 401 Unauthorized.
Is there a way to access these images pasted from the clipboard?
Or are these only visible/accessible from inside Microsoft Teams?
This way the Teams user thinks everything is alright, but the Bot/other application has no access to them.
Also, where do these clipboard-images be safed afterwards, if not in the SharePoint like "properly uploaded" files? Does the user ever has access to them again?
This applies to Stickers, too. Gifs can be sent without problem, because it's a giphy url.
I am using the OnMessageActivityAsync overload described in the Microsoft Docs
The turnContext includes an Activity with two Attachments: One has Content like
<div><div>\n<div><span><img src=\"https://eu-api.asm.skype.com/v1/objects/[...]/views/imgo\" width=\"247\" id=\"[...]\" itemscope=\"\" itemtype=\"http://schema.skype.com/AMSImage\"\"></span>\n\n</div>\n\n\n</div>\n</div>
And the other one a ContentUrl like
The text was updated successfully, but these errors were encountered: