我有一个 SharePoint url,它工作得非常好,这指向生产环境我使用 nodejs 和getFileByName方法来使用这个 url -
https://xxxx.sharepoint.com/sites/MSDS/Construction/_api/web/GetFileByServerRelativeUrl('/sites/MSDS/Construction/ProductLabels/xxxx.pdf')/$value
现在下面是根本不起作用的优质服务器网址 -
https://xxxx.sharepoint.com/sites/qa-MSDS/Construction/_api/web/GetFileByServerRelativeUrl('/sites/qa-MSDS/Construction/ProductLabels/xxxx.pdf')/$value
不同的是,当我使用 qa web api 时,我得到以下错误qa-MSDS
-MSDS
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-2147024809, System.ArgumentException</m:code>
<m:message xml:lang="en-US">
Server relative urls must start with SPWeb.ServerRelativeUrl
</m:message>
</m:error>
谁能建议我做错了什么或如何在节点 js 环境中以更好的方式解决这个问题?