![](/img/trans.png)
[英]Queue Name is not binding to azure service bus (Azure Logic Apps)
[英]Logic Apps + Form Recognizer unable to send PDF to service
我有一个 Azure 逻辑应用程序,它对Analyze Document for Prebuilt or Custom models (v3.0 API)
。 自定义 Model 很好,我可以毫无问题地用 Postman 打它。
当我尝试从 Sharepoint 获取 PDF 并将其发送到服务时,我收到一条错误消息:
{
"error": {
"code": "InvalidRequest",
"message": "Invalid request.",
"innererror": {
"code": "InvalidContent",
"message": "The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats."
}
}
}
我试过了:
Get file content
直接传递给Document/Image File Content
输入body('Get_file_content)['$content']
concat('data:application/pdf;base64,',body('Get_file_content')['$content']
base64ToBinary(body('Get_file_content')['$content'])
为什么我不能将文件发送到表单识别器服务?
编辑:
感谢@vijaya。 他们帮助我看到Document/Image URL
参数不是必需的。 将其留空并使用原始的Get File Content
就可以了!
问题在于内容类型。 您需要将内容类型与分析文档的内容一起传递。 我已经从我这边复制了问题,下面是我遵循的步骤,
最初创建的逻辑应用程序如下所示,
逻辑应用因错误The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats.
The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats.
接下来修改logic app如下图,
在 Compose 操作中,将内容设置为outputs('Get_blob_content_(V2)')?['body']?['$content']并将内容类型作为 application/pdf 传递,因为我们正在处理 pdf 个文件。
在 Analyze Document for Prebuilt or Custom models (v3.0 API) 操作中,使用在文档/图像文件内容中撰写的输出。
Analyze Document的Output如下图,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.