在Android中使用谷歌云端硬盘API获取谷歌驱动器上创建文件的大小 [英] Get size of file created on Google drive using Google drive api in android

查看:285
本文介绍了在Android中使用谷歌云端硬盘API获取谷歌驱动器上创建文件的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建使用的用户将能够获得所有文件从列表谷歌的车程,就可以下载应用程序。

I have created application using which user will able to get all files in list from Google drive and will be able to download it.

现在用户可以下载自己上传到驱动器进度计数的文件。
但我不能让那些对Goolge的硬盘创建例如文档,presentation,S preadsheet ..等文件的大小。用户仍然可以下载这些files.I要显示进度条从1到100,而下载那些files.But我没有文件大小长。

Now User can download files which he has uploaded to drive with progress count. but I could not get size of files that are created on Goolge drive e.g Documents,Presentation,Spreadsheet ..etc . still user can download those files.I want to show progress bar from 1 to 100 while downloading for those files.But I dont have filesize in long.

我已经通过谷歌驱动的API文档了,对于谷歌驱动files.Doc没有文件大小的参数说明的这是只填入与存储在驱动器的内容文件。这里

I have gone through Google drive api docs ,there is no filesize parameter for Google drive files.Doc says "This is only populated for files with content stored in Drive." here

谷歌驱动API文档

请帮我解决这个小问题。
先谢谢了。

Please help me to fix this small problem. Thanks in advance.

推荐答案

您不能得到的大小,因为谷歌不知道它的谷歌文档文件(文件,ssheet等)。如果你下载这些,你实际上是在下载这是动态创建一个导出文件。

You can't get the size because Google doesn't know it for Google docs files (doc, ssheet, etc). If you download them, you are actually downloading an export file which is created dynamically.

这篇关于在Android中使用谷歌云端硬盘API获取谷歌驱动器上创建文件的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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