【问题标题】:How to get folder names from SharePoint Asset Library如何从 SharePoint 资产库中获取文件夹名称
【发布时间】:2016-01-22 08:31:00
【问题描述】:

Here 是获取文件名的链接。但我想使用 REST 查询获取文件夹名称。请帮忙

【问题讨论】:

    标签: rest sharepoint


    【解决方案1】:

    对我来说是“RootFolder/ServerRelativeUrl”

    SharepointAPI.GetLists({params:{$select:"Id,Title,EntityTypeName,RootFolder/ServerRelativeUrl",$expand:"RootFolder"}}).$promise.then(function(result) { ... }); this.GetLists = 函数(参数){ 返回{$承诺: $http({ 方法:“获取” , 网址:app_web_url+"/_api/web/lists" , 参数:params.params ,标题:{ “接受”:“应用程序/json;odata=verbose” } }) .then(函数(响应){ 返回响应。数据; }) }; };

    【讨论】:

      【解决方案2】:

      尝试调用此端点:

      /_api/web/Lists/GetByTitle('Site Assets')/Items?$expand=Folder&$select=Title,Folder/ServerRelativeUrl
      

      【讨论】:

        猜你喜欢
        • 2015-10-10
        • 2015-11-12
        • 2014-03-10
        • 2018-07-03
        • 2015-10-17
        • 2014-05-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多