Sharath Kirani
Sharath Kirani

Reputation: 105

How to Upload a folder to shared google drive using python google drive api?

Code mentioned in https://developers.google.com/drive/api/v3/folder works for My Drive. No luck Using:

file_metadata = {
            'supportsAllDrives':True,
            'driveId': '0AGRl',
            'name': "new folderrrrr",
            'mimeType': 'application/vnd.google-apps.folder',
        }

file = DRIVE.files().create(body=file_metadata,
                            fields='id', supportsAllDrives=True, supportsTeamDrives=True).execute()```


Upvotes: 0

Views: 80

Answers (1)

ziganotschka
ziganotschka

Reputation: 26796

Replace

'driveId': '0AGRl'

through

"parents": ["0AGRl"]

Upvotes: 1

Related Questions