mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-18 21:26:03 +08:00
fix: Use correct OAuth token and headers in Google Drive file upload
This commit is contained in:
parent
1542cb486d
commit
f4f8334153
@ -530,9 +530,7 @@
|
|||||||
id: fileData.id,
|
id: fileData.id,
|
||||||
name: fileData.name,
|
name: fileData.name,
|
||||||
url: fileData.url,
|
url: fileData.url,
|
||||||
headers: {
|
headers: fileData.headers // Use the actual headers from the picker
|
||||||
Authorization: 'Bearer [REDACTED]'
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
const uploadEvent = {
|
const uploadEvent = {
|
||||||
type: 'google-drive',
|
type: 'google-drive',
|
||||||
|
@ -130,8 +130,8 @@ export const createPicker = () => {
|
|||||||
name: fileName,
|
name: fileName,
|
||||||
url: downloadUrl,
|
url: downloadUrl,
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${oauthToken}`,
|
'Authorization': `Bearer ${token}`, // Use the current valid token
|
||||||
'Content-Type': 'application/json'
|
'Accept': 'application/json'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
console.log('Resolving picker with:', result);
|
console.log('Resolving picker with:', result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user