mirror of
https://github.com/open-webui/open-webui
synced 2025-01-01 08:42:14 +00:00
feat: Improve Google Drive file upload handling in chat context
This commit is contained in:
parent
ec26296dc3
commit
1cc4eb241a
@ -532,12 +532,16 @@
|
|||||||
url: fileData.url,
|
url: fileData.url,
|
||||||
headers: fileData.headers // Use the actual headers from the picker
|
headers: fileData.headers // Use the actual headers from the picker
|
||||||
});
|
});
|
||||||
const uploadEvent = {
|
// Create a File object from the blob with proper name
|
||||||
type: 'google-drive',
|
const file = new File([fileData.blob], fileData.name, {
|
||||||
data: fileData
|
type: fileData.blob.type
|
||||||
};
|
});
|
||||||
console.log('Dispatching upload event:', uploadEvent);
|
console.log('Created File object:', {
|
||||||
dispatch('upload', uploadEvent);
|
name: file.name,
|
||||||
|
size: file.size,
|
||||||
|
type: file.type
|
||||||
|
});
|
||||||
|
await uploadFileHandler(file);
|
||||||
console.log('Upload event dispatched');
|
console.log('Upload event dispatched');
|
||||||
} else {
|
} else {
|
||||||
console.log('No file was selected from Google Drive');
|
console.log('No file was selected from Google Drive');
|
||||||
|
Loading…
Reference in New Issue
Block a user