Google Drive SDK does not return headRevisionId for Google Docs format

I am working on a Google Drive sync mechanism. I am using the Google Drive SDK for Python. The problem I am facing is that the Google SDK does not return headRevisionId - it is the metadata of the resource files if the file is google MimeType, i.e. it is created with google docs. It is important for me to keep headRevisionId.

Files that are downloaded by the user from his local machine have headRevisionId in their metadata. this problem only applies to google docs.

How to get headRevisionId from such files. any workaround for this?

Thanks Akif

+2
source share
2 answers

I see the same behavior, despite messages indicating a problem: The head version does not work in accordance with the formats of Google Docs .

Currently, the way to get headRevisionId in a Google Doc is to make a separate change list call (drive.revisions.list) in a file.

Version Control Information: https://developers.google.com/drive/manage-revisions

+3
source

According to this page , as it is currently intended to work.

#head_revision_id ⇒ String The ID of the file head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files. 
0
source

Source: https://habr.com/ru/post/1496559/


All Articles