소스 검색

feat: Update Google Drive download URL format for better compatibility

Taylor Wilsdon (aider) 4 달 전
부모
커밋
1feaee8eca
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/lib/utils/google-drive-picker.ts

+ 2 - 2
src/lib/utils/google-drive-picker.ts

@@ -130,9 +130,9 @@ export const createPicker = () => {
                                 throw new Error('Required file details missing');
                             }
                         
-                            // Construct download URL without embedding token
+                            // Construct download URL using usercontent format
                             console.log('Constructing download URL for fileId:', fileId);
-                            const downloadUrl = `https://www.googleapis.com/drive/v3/files/${fileId}?alt=media`;
+                            const downloadUrl = `https://drive.usercontent.google.com/u/0/uc?id=${fileId}&export=download`;
                             console.log('Download URL constructed:', downloadUrl);
 
                             console.log('Current token value:', token ? 'Token exists' : 'No token');