問題描述
我一直在研究谷歌驅動器同步機制.我正在為此使用 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的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!