Google Drive SDK not returning headRevisionId for google Docs format

折月煮酒 提交于 2019-12-30 07:28:45

问题


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.

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

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

Thanks Akif


回答1:


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

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.

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




回答2:


According to this page this is how it is currently meant to work.

#head_revision_id ⇒ String

The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.


来源:https://stackoverflow.com/questions/18913860/google-drive-sdk-not-returning-headrevisionid-for-google-docs-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!