Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR : correction for Bing search image api endpoint #1258

Merged
merged 7 commits into from
Jul 11, 2022
Merged

Conversation

PooLP
Copy link
Contributor

@PooLP PooLP commented Jul 8, 2022

Q A
Bug fix? [x ]
New feature? [ ]
New sample? [ ]
Related issues? fixes #1256

What's in this Pull Request?

fix(FilePicker) : correction for Bing search image api endpoint
doc(FilePicker) : add precision for Bing Search image API

@PooLP
Copy link
Contributor Author

PooLP commented Jul 10, 2022

I have modified "toRelativeUrl" method because if the regEx is called at the root site level causes performance problem with long url.
Test this on Chrome console to test performance problem :
"https://superlongspnamewithmoreword.sharepoint.com".replace(/^(?:\/\/|[^/]+)*\//, '/');

@PooLP
Copy link
Contributor Author

PooLP commented Jul 10, 2022

I have modified the Url build for getListItems method on OrgAssetsService because the old builder didn't work if file picker is used with organisation asset/lib declared on root site.

The modification is not perfect, but I didn't want to add side effects by modifying the "buildAbsoluteUrl" method.

The test requires having 2 test environments, 1 with org assets declared in root side, a secondary with org assets declared in another site collection. you can't have both at the same time/tenant.

@AJIXuMuK AJIXuMuK merged commit 1cd6499 into pnp:dev Jul 11, 2022
@AJIXuMuK
Copy link
Collaborator

Thank you @PooLP for the fix!

@AJIXuMuK AJIXuMuK added this to the 3.9.0 milestone Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants