I am trying to add the OneDrive Web picker SDK (Javascript) to my website. There is a "redirect URL" that must be added for each page on which the picker is located. The problem I'm having is that my URL is, e.g., www.mysite.com/user/382982389745
. Now, I can't reasonably be expected to add a redirect URL for each user in my database. So, how can I handle this issue since the redirect URL must match exactly to the page that has the file picker?
问题:
回答1:
Hi am facing the same Problem, After spending few hours I am able to fix this problem.
Please follow the steps.
Step 1) Go to the Link Download the File Js file and save it https://js.live.net/v6.0/OneDrive.js
Step 2) Unminfiy the js file using any of the online tool
Step 3) Replace Line 2265 with -- if (!a) a = rf(document.location.origin);
Step 4) Save Js File and use in your Project
Step 5) In API set the Redirect URL as Base URL of the Application
or -- http://example.com
Here we go.. It will fix you probem. It work on all page of the same Base URL.
If you still have any query write to me - shobhitwalia@gmail.com
回答2:
I have dealt with a similar problem. My solution was to add the Id as a parameter which seemed to work.
In your case change the url to www.mysite.com/user?id=382982389745 and then the redirect url to www.mysite.com/user