Reputation: 1
I'm trying to use OneDrive file picker for JavaScript v7.2: https://learn.microsoft.com/en-us/onedrive/developer/controls/file-pickers/js-v72/open-file?view=odsp-graph-online
On filepicker window load, I get a list of my OneDrive files and folders, which include my RECORDINGS folder. I would like to achieve the following:
I understand it might be possible by using the search items API (https://learn.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0&tabs=http), but I would like to save myself the effort of creating the filepicker's UI.
Thanks
Upvotes: 0
Views: 606
Reputation: 1
Here is what we do. Below the option enpointHint receives the passed in link to the folder that you want to start in. (ie, https://sharepoint.com/sites/RECORDINGS)
var odOptions = {
clientId: "blah-blah-blah",
action: "query",
viewType: "files",
multiSelect: true,
advanced: {
isConsumerAccount: true,
endpointHint: PASSED_IN_LINK_TO_FOLDER,
navigation: {
disable: true
}
},
};
OneDrive.open(odOptions);
Upvotes: 0