【发布时间】:2022-01-27 23:28:33
【问题描述】:
我正在尝试在上传到 SharePoint 的文件中搜索字符串。
我正在使用向 SharePoint 发送 HTTP 请求来获取文件内容。但是 $content 在 Base64 中作为对象返回。如何在返回的 $content 中搜索字符串?
/_api/web/getfilebyserverrelativeurl('/sites/mySite/Shared%20Documents/myFileInWordOrPDFformat.docx')/$value?binaryStringResponseBody=true
headers:
{
"accept": "application/json;odata=nometadata",
"content-type": "application/json;odata=nometadata",
"odata-version": ""
}
返回
{
"$content-type": "application/octet-stream",
"$content": "UEsDBBQAAAAIANZualN4vZl3IWQAAO2wAQARABwAd29-BlahBlahBlah-QQAAPCJAAAAAA=="
}
类似的帖子- https://sharepoint.stackexchange.com/questions/273774/how-to-get-content-of-file-in-sharepoint-using-sharepoint-rest-api https://debajmecrm.com/binary-to-base64-in-microsoft-power-automate-microsoft-flow/ https://linnzawwin.blogspot.com/2021/02/handle-base64-and-binary-file-content.html
有帮助,但我仍然不清楚。
我需要将我正在搜索的字符串转换为 Base64 并以这种方式搜索吗?
有什么建议吗?另外,我没有使用高级连接器的选项。
TIA!
【问题讨论】:
标签: sharepoint-online power-automate