Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File.md5Checksum equivalent for Google Doc files

For non-Google Doc files in a Google Drive, I can detect a change by comparing the File.md5Checksum with a previous value.

md5Checksum is null for Google Doc files:

 application/vnd.google-apps.*

Is there any method besides File.modifiedDate?

Admittedly, it's sort of a corner case: if a doc goes from state A => B => A, then the modifiedDate will change but not the content.

like image 413
Brad Tofel Avatar asked Nov 18 '25 23:11

Brad Tofel


1 Answers

File.modifiedDate is definitely a good solution but you should consider using the Changes feed to detect changes to file:

https://developers.google.com/drive/manage-changes

Once you retrieve the Changes feed, you can filter the entries using the fileId field.

like image 84
Claudio Cherubino Avatar answered Nov 21 '25 17:11

Claudio Cherubino



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!