Google Drive SDK 未返回 google Docs 格式的 headRevisionId

时间:2023-01-25
本文介绍了Google Drive SDK 未返回 google Docs 格式的 headRevisionId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我一直在研究谷歌驱动器同步机制.我正在为此使用 Google Drive Python SDK.我遇到的问题是,如果文件是 google MimeType,google SDK 不返回 headRevisionId 是文件资源的元数据,即它是使用 google 文档创建的.存储 headRevisionId 对我来说很重要.

I have been working on google drive sync mechanism. I am using Google Drive Python SDK for it. The issue i am having is that the google SDK does not return headRevisionId is file resource's metadata if the file is google MimeType i.e it has been created with google docs. Its important for me to store headRevisionId.

用户从本地机器上传的文件在其元数据中确实包含 headRevisionId.此问题仅适用于那些 google 文档.

Files which are uploaded by user from his local machine does have headRevisionId in its metadata. this issue is for only those google docs.

如何获取此类文件的 headRevisionId.有什么解决方法吗?

How do i get headRevisionId of such files. any workaround for this?

谢谢阿基夫

推荐答案

我看到了相同的行为,尽管消息表明问题已得到解决:Head revision 无法按预期适用于 Google Docs 格式.

I'm seeing the same behavior, despite messages indicating the issue was addressed: Head revision not working as intended for Google Docs formats.

目前,我在 Google Doc 上检索 headRevisionId 的方法是单独调用以列出 fileId 上的修订 (drive.revisions.list).

For now the way I retrieve headRevisionId on a Google Doc is to make a separate call to list revisions (drive.revisions.list) on the fileId.

有关管理修订的详细信息:https://developers.google.com/drive/manage-修订

Details on managing revisions: https://developers.google.com/drive/manage-revisions

这篇关于Google Drive SDK 未返回 google Docs 格式的 headRevisionId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

上一篇:Pydrive 谷歌驱动器自动身份验证 下一篇:设置“发布到网络"在 Google 电子表格中使用 Drive python API

相关文章

最新文章