1313except Exception as e :
1414 print (f"An error occurred: { str (e )} " )
1515
16-
17- credentials = service_account . Credentials . from_service_account_file ( 'cohesive-scope-400809-b4cb18e44e7b.json' , scopes = ['https://www.googleapis.com/auth/drive' ])
16+ credentials = service_account . Credentials . from_service_account_file ( 'cohesive-scope-400809-b4cb18e44e7b.json' ,
17+ scopes = ['https://www.googleapis.com/auth/drive' ])
1818
1919drive_service = build ('drive' , 'v3' , credentials = credentials )
2020
21- project_folder_path = 'C:/Users/LENOVO/CGprojects/massive'
21+ project_folder_path = 'C:/Users/Usewr/computer_graphics/massive'
22+
2223
2324def upload_file (file_path , parent_folder_id ):
2425 filename = os .path .basename (file_path )
@@ -29,6 +30,7 @@ def upload_file(file_path, parent_folder_id):
2930 media = MediaFileUpload (file_path )
3031 drive_service .files ().create (body = file_metadata , media_body = media , fields = 'id' ).execute ()
3132
33+
3234folder_metadata = {
3335 'name' : 'Computer Graphics GRP9' ,
3436 'mimeType' : 'application/vnd.google-apps.folder'
@@ -49,4 +51,4 @@ def upload_file(file_path, parent_folder_id):
4951 if '.git' not in file_path :
5052 upload_file (file_path , folder_id )
5153
52- print (
'Project folder uploaded successfully and shared with [email protected] .' )
54+ print (
'Project folder uploaded successfully and shared with [email protected] .' )
0 commit comments