[英]Android Google Drive API upload to my public folder
I'm developing an app which will allow users to upload photos to my Google Drive public folder. 我正在开发一个应用程序,允许用户将照片上传到我的Google云端硬盘公用文件夹。 Currently, from online tips, i managed to do the upload process. 目前,通过在线提示,我设法完成了上传过程。 However, each users can only upload the photo to their own Drive. 但是,每个用户只能将照片上传到自己的云端硬盘。 I've been searching the net for the tips, some are suggesting to use REST API but I don't know how to implement it. 我一直在网上搜索提示,有些人建议使用REST API,但我不知道如何实现它。 I've been reading this guide and still don't know how to do it on android. 我一直在阅读本指南,但仍然不知道如何在android上做到这一点。 Can someone point show a simple way of uploading a file to public folder using REST API on android. 有人指出可以使用Android上的REST API将文件上传到公用文件夹的简单方法。
Since you already managed to upload a file , the only problem is how to upload a file to public folder on Android. 由于您已设法上传文件 ,唯一的问题是如何将文件上传到Android上的公用文件夹。 I have read in this SO that Drive API for Android only supports authorizing the current user. 我在这读SO该驱动器API为Android只支持授权当前用户。 You can file a feature request for this. 您可以为此提交功能请求 。 This workaround might also help: However if you use the Google APIs Java client instead to access the Drive API you can store credentials for your account with the application and use those for all users of your app. 此解决方法也可能有所帮助: 但是,如果您使用Google API Java客户端来访问Drive API,则可以使用该应用程序存储帐户的凭据,并将其用于应用的所有用户。 Read more about authorization and the Java client here . 在此处阅读有关授权和Java客户端的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.