在 Business Central 中通过 HTTP Post 发送 Word 文档(无需 OnPrem 范围)
我需要能够在 Business Central 中通过 HTTP POST 发送 Word 文档。它需要发送到接收两个 Word 文档的 Azure 函数。 我如何将 Word 文档上传到 Business Central(我假设通过 UploadIntoStream),然后通过 HTTP 发送文件?
I need to be able to send a Word document over HTTP POST in Business Central. It needs to be sent to an Azure Function that takes in two Word documents.
How would I go about uploading the Word documents to Business Central (I Assume through UploadIntoStream) and then sending the files over HTTP?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是对的,你需要将文件上传到流中并通过 HTTP 发送。根据您的 Azure 函数,您需要对其进行 Base64 编码或将其作为二进制文件发送。这应该对您有所帮助。
下面的模型代码告诉您如何将上传的文件插入到 HTTP 请求中,但它不包含完全工作的、经过身份验证的 HTTP 请求。这取决于您的 Azure Function 设置。
You are correct, you need to upload the file into a stream and send it over HTTP. Depending on your azure function you need to either base64 encode it or send it as a binary. This should help you on your way.
The below is mockup code that tells you how to insert an uploaded file into a HTTP request but it does not contain a fully working, authenticated HTTP request. That depends on you Azure Function setup.