简体   繁体   中英

Google Drive SDK not returning headRevisionId for google Docs format

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 ie 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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM