我在共享的谷歌硬盘中有一个共享文件夹
https://gyazo.com/ae22a1d04eeddf9de49adbf470706ac8
我正在尝试使用Pydrive将一个文件上载到这个团队的google drive。此代码用于上传到我的驱动器中的特定文件夹,但不在共享驱动器中的任何文件夹中
file_drive = drive.CreateFile({'title': file_name,
"parents": [{"kind": "drive#fileLink", "id": folder_id}]})
file_drive.SetContentFile(f.name)
file_drive.Upload()
我拥有对所有文件的完全访问权限以及创建/删除文件/文件夹的权限。谁能给我一个提示吗
当我写这篇文章的时候,我偶然发现了以下线索
https://github.com/gsuitedevs/PyDrive/issues/149
使用以下代码并使用“supportsTeamDrives”和“teamDriveId”参数可以轻松解决此问题
相关问题 更多 >
编程相关推荐