【问题标题】:unable to add attachment to sharepoint list using ThyBAG api无法使用 ThyBAG api 将附件添加到共享点列表
【发布时间】:2016-02-11 01:43:30
【问题描述】:

环境:Linux
后端:Drupal/PHP。
正在使用的 Sharepoint API:https://github.com/thybag/PHP-SharePoint-Lists-API/

我已经使用 WSDL 文件成功建立了与共享点的连接。我可以使用上述 API 插入、删除和更新列表。但我无法向列表项添加附件。我尝试使用 API 函数(addAttachment),但它抛出以下错误-

"Caught exception: Error (soap:Server) 异常类型 “Microsoft.SharePoint.SoapServer.SoapServerException”原为 throw.,more=Detailed: 此页面的安全验证是 无效的。在 Web 浏览器中单击返回,刷新页面,然后尝试 再次操作。”

如果有人遇到同样的问题,请告诉我。

谢谢。

【问题讨论】:

    标签: php drupal-7 sharepoint-online


    【解决方案1】:

    我得到了上述问题的解决方案。问题在于这个文件

    PHPSharePointListsAPI/src/Thybag/Auth/SharePointOnlineAuth.php 第 22 行

    只需将第 22 行替换为以下代码:-

    $headers = array('SOAPAction: "' . $action . '"');

    如果有人自古以来就一直坚持下去,希望能有所帮助.. :P

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-14
      • 2010-11-17
      • 1970-01-01
      • 2018-09-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多