mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
feat: Improve Google Drive file upload with correct headers
This commit is contained in:
parent
7d55f9bc2e
commit
29efee8ede
2 changed files with 3 additions and 5 deletions
|
|
@ -362,10 +362,7 @@
|
|||
|
||||
try {
|
||||
files = [...files, fileItem];
|
||||
// Pass both URL and headers to processWeb
|
||||
const res = await processWeb(localStorage.token, '', fileData.url, {
|
||||
headers: fileData.headers
|
||||
});
|
||||
const res = await processWeb(localStorage.token, '', fileData.url, fileData.headers);
|
||||
|
||||
if (res) {
|
||||
fileItem.status = 'uploaded';
|
||||
|
|
|
|||
|
|
@ -126,7 +126,8 @@ export const createPicker = () => {
|
|||
name: fileName,
|
||||
url: downloadUrl,
|
||||
headers: {
|
||||
'Authorization': `Bearer ${oauthToken}`
|
||||
'Authorization': `Bearer ${oauthToken}`,
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
};
|
||||
console.log('Resolving picker with:', result);
|
||||
|
|
|
|||
Loading…
Reference in a new issue