diff --git a/abr-testing/abr_testing/automation/google_drive_tool.py b/abr-testing/abr_testing/automation/google_drive_tool.py index 8e2f55b0759..8b56d0390fe 100644 --- a/abr-testing/abr_testing/automation/google_drive_tool.py +++ b/abr-testing/abr_testing/automation/google_drive_tool.py @@ -2,6 +2,7 @@ import os from typing import Set, Any, Optional import webbrowser +import mimetypes from oauth2client.service_account import ServiceAccountCredentials # type: ignore[import] from googleapiclient.discovery import build from googleapiclient.http import MediaFileUpload @@ -74,10 +75,9 @@ def upload_file(self, file_path: str) -> str: """Upload file to Google Drive.""" file_metadata = { "name": os.path.basename(file_path), - "mimeType": "application/json", + "mimeType": str(mimetypes.guess_type(file_path)[0]), "parents": [self.parent_folder], } - media = MediaFileUpload(file_path, resumable=True) uploaded_file = (