问题描述
我无法通过在Web聊天机器人框架中使用Attachment
传递URL来在浏览器的新标签页中打开pdf。我的代码段如下。
Attachment attachment = new Attachment();
attachment.ContentType = "application/pdf";
attachment.ContentUrl = DocUrl;
attachment.Name = "Name";
var response = helper.CreateResponseWithSuggestions(valueDataState.suggessionReply,attachment);
await turnContext.SendActivityAsync(response).ConfigureAwait(false);
-----在助手中------
public Activity CreateResponseWithSuggestions(Activity SuggestionsActivity,Attachment attachment)
{
var response = SuggestionsActivity;
response.Attachments = new List<Attachment>() { attachment };
return response;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)