问题
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