问题描述
使用 json 对象以 Base64 字符串发送 PDF。在传递之前将 Stream 转换为 Base64。使用 Http trigger post 调用逻辑应用
电子邮件是使用来自逻辑应用程序的 pdf 生成的,但未打开 PDF。 Base64 内容是否已损坏?
在逻辑应用中,通过 ContentBytes => triggerBody()['attachments']?['ContentBytes'] 和 ContentBytes => base64(triggerBody()['attachments']?['ContentBytes'])
解决方法
经过一些测试后,您应该使用 base64ToBinary
表达式:
base64ToBinary(triggerBody()['attachments']?['ContentBytes'])