How can I use the drive.file oauth2 scope with a folder in Google Drive? [duplicate]

这一生的挚爱 提交于 2019-12-11 04:29:16

问题


I'm working on a web app that will work with users' folders in Google Drive rather than individual files. I'd like to request the minimum permissions needed by using the drive.file scope. I'm using the Drive picker UI to allow the user to select a folder, which works nicely with the drive.file and adds the folder to the list of folders my app can access.

However, the problem is that it only grants access to the folder as if it were a single file, without also recursively granting access to all the files and subfolders inside the folder the user selected. My app currently doesn't with the Drive UI to provide an Open with... option for folders, so I don't know if that would grant the correct access permissions or not.

How can I use the Google Drive picker UI to select a folder while using the drive.file scope?


回答1:


If you're looking for folders using Drive Picker, can you try using the google.picker.​ViewId.FOLDERS view? I've used the Drive Picker in my web app as well and I use google.picker.​ViewId.DOCS_IMAGES view because I'm working on image files. If this does not address your issue, it may not be supported yet.



来源:https://stackoverflow.com/questions/51274573/how-can-i-use-the-drive-file-oauth2-scope-with-a-folder-in-google-drive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!