diff --git a/application/parser/connectors/google_drive/loader.py b/application/parser/connectors/google_drive/loader.py index 7705a3c1..c96a08be 100644 --- a/application/parser/connectors/google_drive/loader.py +++ b/application/parser/connectors/google_drive/loader.py @@ -32,6 +32,10 @@ class GoogleDriveLoader(BaseConnectorLoader): 'text/plain': '.txt', 'text/csv': '.csv', 'text/html': '.html', + 'text/markdown': '.md', + 'text/x-rst': '.rst', + 'application/json': '.json', + 'application/epub+zip': '.epub', 'application/rtf': '.rtf', 'image/jpeg': '.jpg', 'image/jpg': '.jpg', diff --git a/deployment/docker-compose-hub.yaml b/deployment/docker-compose-hub.yaml index cf04b331..fe6a6bcb 100644 --- a/deployment/docker-compose-hub.yaml +++ b/deployment/docker-compose-hub.yaml @@ -6,7 +6,6 @@ services: environment: - VITE_API_HOST=http://localhost:7091 - VITE_API_STREAMING=$VITE_API_STREAMING - - VITE_GOOGLE_API_KEY=$VITE_GOOGLE_API_KEY - VITE_GOOGLE_CLIENT_ID=$VITE_GOOGLE_CLIENT_ID ports: - "5173:5173" diff --git a/deployment/docker-compose.yaml b/deployment/docker-compose.yaml index 7bb8220a..2eef387b 100644 --- a/deployment/docker-compose.yaml +++ b/deployment/docker-compose.yaml @@ -7,7 +7,6 @@ services: environment: - VITE_API_HOST=http://localhost:7091 - VITE_API_STREAMING=$VITE_API_STREAMING - - VITE_GOOGLE_API_KEY=$VITE_GOOGLE_API_KEY - VITE_GOOGLE_CLIENT_ID=$VITE_GOOGLE_CLIENT_ID ports: - "5173:5173" diff --git a/frontend/src/components/GoogleDrivePicker.tsx b/frontend/src/components/GoogleDrivePicker.tsx index f1a33a23..5112789c 100644 --- a/frontend/src/components/GoogleDrivePicker.tsx +++ b/frontend/src/components/GoogleDrivePicker.tsx @@ -104,12 +104,11 @@ const GoogleDrivePicker: React.FC = ({ try { const clientId: string = import.meta.env.VITE_GOOGLE_CLIENT_ID; - const developerKey : string = import.meta.env.VITE_GOOGLE_API_KEY; // Derive appId from clientId (extract numeric part before first dash) const appId = clientId ? clientId.split('-')[0] : null; - if (!clientId || !developerKey || !appId) { + if (!clientId || !appId) { console.error('Missing Google Drive configuration'); setIsLoading(false); @@ -120,14 +119,14 @@ const GoogleDrivePicker: React.FC = ({ clientId: clientId, developerKey: "", appId: appId, - setSelectFolderEnabled: true, + setSelectFolderEnabled: false, viewId: "DOCS", showUploadView: false, - showUploadFolders: true, + showUploadFolders: false, supportDrives: false, multiselect: true, token: accessToken, - viewMimeTypes: 'application/vnd.google-apps.folder,application/vnd.google-apps.document,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.ms-powerpoint,application/vnd.ms-excel,text/plain,text/csv,text/html,application/rtf,image/jpeg,image/jpg,image/png', + viewMimeTypes: 'application/vnd.google-apps.document,application/vnd.google-apps.presentation,application/vnd.google-apps.spreadsheet,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.ms-powerpoint,application/vnd.ms-excel,text/plain,text/csv,text/html,text/markdown,text/x-rst,application/json,application/epub+zip,application/rtf,image/jpeg,image/jpg,image/png', callbackFunction: (data:any) => { setIsLoading(false); if (data.action === 'picked') { @@ -137,14 +136,14 @@ const GoogleDrivePicker: React.FC = ({ const newFolders: PickerFile[] = []; docs.forEach((doc: any) => { - const item = { - id: doc.id, - name: doc.name, - mimeType: doc.mimeType, - iconUrl: doc.iconUrl || '', - description: doc.description, - sizeBytes: doc.sizeBytes - }; + const item = { + id: doc.id, + name: doc.name, + mimeType: doc.mimeType, + iconUrl: doc.iconUrl || '', + description: doc.description, + sizeBytes: doc.sizeBytes + }; if (doc.mimeType === 'application/vnd.google-apps.folder') { newFolders.push(item);