如何将drive.file oauth2范围与Google云端硬盘中的文件夹一起使用? [英] How can I use the drive.file oauth2 scope with a folder in Google Drive?

查看:274
本文介绍了如何将drive.file oauth2范围与Google云端硬盘中的文件夹一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个网络应用程序,它将与用户在Google云端硬盘中的文件夹(而不是单个文件)一起使用.我想通过使用 drive.file范围.我正在使用驱动器选择器UI 来允许用户选择一个文件夹,该文件夹与drive.file并将文件夹添加到我的应用程序可以访问的文件夹列表中.

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.

但是,问题在于,它仅授予对文件夹的访问权限,就好像它是单个文件一样,而没有递归地授予对用户选择的文件夹内的所有文件和子文件夹的访问权限.我的应用程序当前没有使用Drive UI为文件夹提供打开方式..."选项,因此我不知道这是否会授予正确的访问权限.

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.

在使用drive.file范围时如何使用Google云端硬盘选择器用户界面选择文件夹?

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

推荐答案

如果您正在使用驱动器选择器"查找文件夹,是否可以尝试使用

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.

这篇关于如何将drive.file oauth2范围与Google云端硬盘中的文件夹一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆