mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 14:55:23 +00:00
feat: Add folder selection and app ID to Google Drive picker
This commit is contained in:
parent
ba19ff8ace
commit
7d31b111cc
1 changed files with 2 additions and 0 deletions
|
|
@ -100,8 +100,10 @@ export const createPicker = () => {
|
||||||
|
|
||||||
const picker = new google.picker.PickerBuilder()
|
const picker = new google.picker.PickerBuilder()
|
||||||
.addView(google.picker.ViewId.DOCS)
|
.addView(google.picker.ViewId.DOCS)
|
||||||
|
.addView(google.picker.ViewId.FOLDERS)
|
||||||
.setOAuthToken(token)
|
.setOAuthToken(token)
|
||||||
.setDeveloperKey(API_KEY)
|
.setDeveloperKey(API_KEY)
|
||||||
|
.setAppId(CLIENT_ID.split('-')[0]) // Extract app ID from client ID
|
||||||
.setCallback((data: any) => {
|
.setCallback((data: any) => {
|
||||||
if (data[google.picker.Response.ACTION] === google.picker.Action.PICKED) {
|
if (data[google.picker.Response.ACTION] === google.picker.Action.PICKED) {
|
||||||
const doc = data[google.picker.Response.DOCUMENTS][0];
|
const doc = data[google.picker.Response.DOCUMENTS][0];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue