From 31f499af0ecc21cb7ad9f019fadc6b73f1ebb998 Mon Sep 17 00:00:00 2001 From: "Taylor Wilsdon (aider)" Date: Mon, 16 Dec 2024 11:00:40 -0500 Subject: [PATCH] fix: Simplify Google Drive file upload handling for spreadsheets --- src/lib/utils/google-drive-picker.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/utils/google-drive-picker.ts b/src/lib/utils/google-drive-picker.ts index 09c3431bc..41cc673c2 100644 --- a/src/lib/utils/google-drive-picker.ts +++ b/src/lib/utils/google-drive-picker.ts @@ -125,7 +125,6 @@ export const createPicker = () => { let downloadUrl; let exportFormat; - let finalFileName = fileName; // Initialize with original filename if (mimeType.includes('google-apps')) { // Handle Google Workspace files @@ -133,8 +132,6 @@ export const createPicker = () => { exportFormat = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; } else if (mimeType.includes('spreadsheet')) { exportFormat = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; - // Update filename with .xlsx extension for spreadsheets if needed - finalFileName = fileName.endsWith('.xlsx') ? fileName : `${fileName}.xlsx`; } else if (mimeType.includes('presentation')) { exportFormat = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; } else { @@ -166,7 +163,7 @@ export const createPicker = () => { const blob = await response.blob(); const result = { id: fileId, - name: finalFileName || fileName, // Use modified filename if available + name: fileName, url: downloadUrl, blob: blob, headers: {