如何在编辑模式下打开文件上传到谷歌驱动器使用谷歌API服务帐户 [英] How to open file in edit mode uploaded to google drive using google api service account

查看:342
本文介绍了如何在编辑模式下打开文件上传到谷歌驱动器使用谷歌API服务帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有谷歌api服务account.I成功上传驱动器上的文件,在浏览器上打开文件。但我无法获得编辑模式。如何打开编辑模式下的特定文件。并且更改将反映到原始文件。
目前我使用链接 https:// drive .google.com / file / d / 0B6TZcMlVILILeEN2al9KanZBS1k / view?usp = drivesdk 这不支持编辑模式。当前用户在上面的链接页面上登录,然后我看到编辑选项,但它保存到当前用户登录帐户,并不反映原始文件。
您现在可以尝试上面的链接。
我正在开发asp.net MVC中的应用程序并使用google api v2解决方案

其中一种方法是共享文件给用户(取决于用例的类型)。文件上传完成后(通过服务帐户),需要其他设置才能共享文件。将角色设置为 writer ,您将很好(通过调用文件的 selfLink


I have google api service account.I successfully upload the file on the drive, open the file on browser.But i am not able to get the edit mode.How can i open a particular file in edit mode.And the changes will reflect to original files. Currently i open the file using link "https://drive.google.com/file/d/0B6TZcMlVILILeEN2al9KanZBS1k/view?usp=drivesdk" this does not support the edit mode. When the current user sign in on the above link page then i see the edit option but it saves to the current user logged in account and not reflect the original file. You can try the above link its working now. I am developing the application in asp.net MVC and using google api v2

解决方案

One approach is to share the files to the users (depending on type in your use case). Once the file has been uploaded (thru Service Account), additional settings will be required to share the file. Set the role as writer and you'll be good to go (by calling the File's selfLink)

这篇关于如何在编辑模式下打开文件上传到谷歌驱动器使用谷歌API服务帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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