本文介绍了Google云端硬盘-未经同意即可访问云端硬盘表格(已知用户名/密码)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读Google Drive的API,它看起来很简单,但是我想以不同的方式使用它.

I've been reading on Google Drive's API which seems straight-forward enough, but I'd like to use it a bit differently.

我需要能够将服务器上给定目录中的文件批量复制到我可以控制的特定Google云端硬盘帐户中,而不是使用客户端应用程序.详细地说,我正在实现扫描到电子邮件"功能,用户可以在其中扫描我们的复印机上的文档,然后将其复制到该Google云端硬盘帐户中.

Instead of a client-side application, I need to be able to batch copy files in a given directory on a server to a specific Google Drive account which I have control over. To elaborate, I'm implementing a scan-to-email feature in which a user can scan a document on our copier which is then copied to that Google Drive account.

这是为内部用户完成的,因此帐户将是通用的,并且没有理由更改密码.这有可能吗?

This is done for internal users, so the accounts would be generic and there would be no reasons to change the passwords. Is this possible at all?

推荐答案

我建议您使用服务帐户.将服务帐户视为用户,服务帐户将拥有自己的驱动器帐户.您将能够将文件上传到其中,并且不需要您的应用程序登录,因为它将内置登录名.您将不能通过网络界面登录并查看该帐户的文件.

I would recommend you go with a service account. Think of a service account as a user, a service account will have its own drive account. You will be able to upload the files to it, and your application wont be required to login as it will have the login built into it. You will not be able to login and see the files for this account via the web interface.

为了让用户再次访问文件,您有几种选择.

In order for the users to access the files again you have a few options.

  1. 然后您可以在文件上设置权限,以允许不同的用户通过那里的google驱动器帐户访问文件. Google驱动器api权限
  2. 您可以创建自己的界面,并使用文件列表进行列表当前存储在服务帐户中的文件.
  1. You can then set the permissions on the files to allow the different users to access the files via there google drive accounts. Google drive api permissions
  2. you could create your own interface and use files list to list the files that are currently stored on the service account.

抬头:

您有时会想知道服务帐户驱动器还剩下多少空间.使用 about.get

You will at some point want to know how much space the service account drive has left. use about.get

Google有许多客户端库,可以使所有这些操作变得非常容易.但是您还没有说您打算使用哪种语言.

Google has a number of client libs that can make doing all of this quite easy. but you haven't said what language you are planning on doing this in.

这篇关于Google云端硬盘-未经同意即可访问云端硬盘表格(已知用户名/密码)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 05:15