Skip to content

Added HandlingAttachments #284

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

Merged
merged 3 commits into from
May 15, 2025
Merged

Conversation

tracyboehrer
Copy link
Member

@tracyboehrer tracyboehrer commented May 14, 2025

Neither Test in WebChat or Emulator appear to work when adding an attachment. I used Insomnia (or Postman) to send an Activity with an attachment.

{
	"type": "message",
	"channelId": "webchat",
	"activityId": "1",
	"conversation": {
		"id": "1"
	},
	"from": {
		"id": "from",
		"name": ""
	},
	"recipient": {
		"id": "me",
		"name": "me"
	},
	"attachments": [
		{
			"name": "image",
			"contentType": "image/png",
			"contentUrl": "https://devblogs.microsoft.com/microsoft365dev/wp-content/uploads/sites/73/2024/11/word-image-23435-1.png"
		}
	],
	"text": "image attached",
	"deliveryMode": "expectReplies",
	"serviceUrl": "https://webchat.botframework.com/"
}

@github-actions github-actions bot added ML: Samples Tags changes to samples ML: Core Tags changes to core libraries labels May 14, 2025
@rido-min
Copy link
Member

I've been able to see the attachments from WebChat and Teams

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably for another discussion, but having the launchSettings.TEMPLATE seems a good approach for 1) set the port and 2) override the auth settings without adding the appserttings.Development.json (that during deployment will be included in the deployment artifact)

@tracyboehrer
Copy link
Member Author

I've been able to see the attachments from WebChat and Teams

The file downloaders only come into play when an Activity is received by the agent, not sent. In Teams, this can be tested in two ways: drag-and-drop (which requires a token), and attaching a file.

@tracyboehrer tracyboehrer marked this pull request as ready for review May 15, 2025 18:38
@tracyboehrer tracyboehrer requested a review from a team as a code owner May 15, 2025 18:38
@tracyboehrer tracyboehrer enabled auto-merge May 15, 2025 18:38
@tracyboehrer
Copy link
Member Author

I've been able to see the attachments from WebChat and Teams

The file downloaders only come into play when an Activity is received by the agent, not sent. In Teams, this can be tested in two ways: drag-and-drop (which requires a token), and attaching a file.

Correction... there are 3 ways: drag-and-drop, attach, and paste.

I believe it's paste that requires the token. Though the way TeamsAttachmentDownloader was written, it just adds to token to all Teams scenarios.

@tracyboehrer tracyboehrer merged commit 0c55c36 into main May 15, 2025
8 checks passed
@tracyboehrer tracyboehrer deleted the users/tracyboehrer/handlingattachments branch May 15, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ML: Core Tags changes to core libraries ML: Samples Tags changes to samples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants