mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 20:07:49 +01:00
fix: Improve Google Drive picker initialization and error handling
This commit is contained in:
@@ -498,11 +498,15 @@
|
||||
}}
|
||||
uploadGoogleDriveHandler={async () => {
|
||||
try {
|
||||
if (!import.meta.env.VITE_GOOGLE_API_KEY || !import.meta.env.VITE_GOOGLE_CLIENT_ID) {
|
||||
throw new Error('Google Drive API credentials not configured');
|
||||
}
|
||||
const fileData = await createPicker();
|
||||
if (fileData) {
|
||||
dispatch('upload', { type: 'google-drive', data: fileData });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Google Drive Error:', error);
|
||||
toast.error('Error accessing Google Drive: ' + error.message);
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user