访问用户Google云端硬盘上的所有文件 [英] Access to all files on a user's Google Drive

查看:125
本文介绍了访问用户Google云端硬盘上的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SkyDrive和Dropbox的api具有管理用户整个驱动器的选项。对于Google Drive,drive.file范围似乎只允许访问由应用程序创建的文件。
Google Drive允许访问整个驱动器吗?

The api's for SkyDrive and Dropbox have options for managing the user's entire drive. For Google Drive, the drive.file scope seems to give only access to the files created by the app. Is there a scope for Google Drive that gives access to the entire drive?

推荐答案

编辑:下面的答案 正确,但最新版本的Drive API允许使用 https://www.googleapis.com/auth/drive 请求整个范围。 。文档列表API不再需要用于此用例。请参阅 https://developers.google.com/drive/scopes#requesting_full_drive_scope_for_an_app

The below answer was correct, but the latest version of the Drive API allows requesting of a full scope with https://www.googleapis.com/auth/drive. The Documents List API is no longer needed for this use case. See https://developers.google.com/drive/scopes#requesting_full_drive_scope_for_an_app

确切地说,Drive API可以访问由应用程序创建的文件以及用户使用Drive UI中的应用程序打开的文件(通过打开方式)。

To be precise the Drive API gives access to Files created by the app and files that the user has opened with the app from the Drive UI (through open-with).

要操作用户的所有云端硬盘文件,您可以使用 Google文档列表API 。尽管我们目前禁止使用Drive应用程序(通过Open-with和Create对话框集成到Drive UI中的应用程序)请求访问文档列表API,因为我们希望将Drive应用程序保留在每个文件的安全模型中。 (基本上在Drive SDK设置中添加文档列表范围会引发错误)。

To manipulate all of the Drive files of the user you can use the Google Document List API . Though we currently forbid Drive applications (the ones that have get integrated in the Drive UI through the Open-with and Create dialogs) to request access to the Document List API as we want to keep Drive application on a per-file security model. (Basically adding the Document List scope in the Drive SDK settings raises an error).

这篇关于访问用户Google云端硬盘上的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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