Skip to content

Commit

Permalink
Merge pull request #3715 from SherpasGroup/fix-download-from-folder
Browse files Browse the repository at this point in the history
Fix download when files are in a folder
  • Loading branch information
wobba committed Apr 29, 2024
2 parents 71a6a8a + 29b6e8e commit 54b6147
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -95,11 +95,14 @@ export class DownloadSelectedItemsButtonComponent extends React.Component<IExpor
"Content-Type": "application/json"
},
body: JSON.stringify({
"parameters":{"RenderOptions":4103}
"parameters":{
"RenderOptions":4103,
"ViewXml": `<View Scope="RecursiveAll"><Query><Where><Eq><FieldRef Name="UniqueId" /><Value Type="Guid">${item["NormUniqueID"]}</Value></Eq></Where></Query></View>`
}
})
};

return this.props.webPartContext.spHttpClient.post(`${item["SPWebUrl"]}/_api/web/lists/GetById('${item["NormListID"]}')/RenderListDataAsStream?FilterField1=UniqueId&FilterValue1=${item["NormUniqueID"]}`, SPHttpClient.configurations.v1, spOptions1)
return this.props.webPartContext.spHttpClient.post(`${item["SPWebUrl"]}/_api/web/lists/GetById('${item["NormListID"]}')/RenderListDataAsStream`, SPHttpClient.configurations.v1, spOptions1)
.then((response: SPHttpClientResponse) => {
return response.json()
});
Expand Down

0 comments on commit 54b6147

Please sign in to comment.