对于 Google Drive 中的非 Google Doc 文件,我可以通过将 File.md5Checksum 与之前的值进行比较来检测更改。
对于 Google Doc 文件,md5Checksum 为空:
application/vnd.google-apps.*
除了 File.modifiedDate 还有什么方法吗?
诚然,这是一种极端情况:如果文档从状态 A => B => A 开始,那么 modifiedDate 会改变,但内容不会改变。
对于 Google Drive 中的非 Google Doc 文件,我可以通过将 File.md5Checksum 与之前的值进行比较来检测更改。
对于 Google Doc 文件,md5Checksum 为空:
application/vnd.google-apps.*
除了 File.modifiedDate 还有什么方法吗?
诚然,这是一种极端情况:如果文档从状态 A => B => A 开始,那么 modifiedDate 会改变,但内容不会改变。
File.modifiedDate 绝对是一个很好的解决方案,但您应该考虑使用 Changes 提要来检测文件的更改:
https://developers.google.com/drive/manage-changes
检索更改提要后,您可以使用该fileId
字段过滤条目。