Please specify what version of the library you are using: [3.17.0]
Expected / Desired Behavior / Question
When editing a content page on the root SharePoint site, when I open the FilePicker control and click the "Your organisation" tab, and then "Images" - I expect to see a list of the files/folders from my org assets image library.
Observed Behavior
On root/home SharePoint site, it doesn't work - and you instead see a spinner icon, with an error logged in the debug console. This only happens on the root/home site. If I use the control on any other site in my SharePoint tenant, it works.
Steps to Reproduce
Create a page in the root/home site of SharePoint, and add a webpart that uses the FilePicker control, and try to browse to Images on the "Your organisation" tab.
More information:
I think the fact the page is being created on the home site (and not within a site that has a Url beginning /sites/my-site/) is confusing the code that builds the Url to fetch the org assets listing from the API.
When using the home/root site, it tries to use this Url to fetch the folder/file list from the org assets image library - which fails:
On the first link, there seems to be some corruption around the area of /OrgAssetssites%27 (our library is called OrgAssets, but its appended the word "sites" on to the end).
Category
[ ] Enhancement [X] Bug [ ] Question
Version
Please specify what version of the library you are using: [3.17.0]
Expected / Desired Behavior / Question
When editing a content page on the root SharePoint site, when I open the FilePicker control and click the "Your organisation" tab, and then "Images" - I expect to see a list of the files/folders from my org assets image library.
Observed Behavior
On root/home SharePoint site, it doesn't work - and you instead see a spinner icon, with an error logged in the debug console. This only happens on the root/home site. If I use the control on any other site in my SharePoint tenant, it works.
Steps to Reproduce
Create a page in the root/home site of SharePoint, and add a webpart that uses the FilePicker control, and try to browse to Images on the "Your organisation" tab.
More information:
I think the fact the page is being created on the home site (and not within a site that has a Url beginning /sites/my-site/) is confusing the code that builds the Url to fetch the org assets listing from the API.
When using the home/root site, it tries to use this Url to fetch the folder/file list from the org assets image library - which fails:
https://MYTENANT.sharepoint.com/_api/SP.List.GetListDataAsStream?listFullUrl=%27https://MYTENANT.sharepoint.com/sites/OrgAssetssites%27&RootFolder=sites/OrgAssets/ACMEImages
When on a normal site, it uses this Url, which works:
https://MYTENANT.sharepoint.com/sites/MYSITE/_api/SP.List.GetListDataAsStream?listFullUrl=%27https://MYTENANT.sharepoint.com/sites/OrgAssets/ACMEImages%27&RootFolder=/sites/OrgAssets/ACMEImages
On the first link, there seems to be some corruption around the area of /OrgAssetssites%27 (our library is called OrgAssets, but its appended the word "sites" on to the end).
Thank you!