如何使用python google drive api将文件夹上传到共享的google drive?

问题描述 投票:0回答:1

https://developers.google.com/drive/api/v3/folder中提到的代码适用于“我的云端硬盘”。没有运气使用:

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()```


google-drive-api
1个回答
1
投票

替换

'driveId': '0AGRl'

通过

"parents": ["0AGRl"]

© www.soinside.com 2019 - 2024. All rights reserved.