2

Getting the list of MediaItems can be done through Google Photos API as well as getting the MediaItem metadata as well as the media item itself.

What if the picture was modified online (e.g. brightness/contrast), then saved?
The MediaItem does not contain something like a hash-code.

How to detect if the photo has been modified?
Does Google Photos API support this use case and how?

edin-m
  • 3,021
  • 3
  • 17
  • 27
  • Maybe its a good idea to put a md5 hash on a photo. Then upload it to google and after downloading it again check the md5 hash again? – arnonuem Jul 05 '19 at 07:12

2 Answers2

1

There is currently no ability to see if a file was changed in the Google Photos api.

There is however a feature request for this currently Provide Modified Date in metadata which might be along what you are looking for.

As suggested in a comment you could probably do this yourself using MD5 but its not going to help you if you want the api to tell you if theres been a change your going to have to test the md5

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
0

Even though DalmTo's answer is true, there is a workaround to this issue.

The HTTP Content-Length header is set with every response when downloading a media item, so one can "probe" the actual media item and stop downloading.

The Content-Length value is the value the item would have as file size after downloading. Assuming changes don't end up having the same file size, this value will be different if a file has been changed (cropped, rotated, etc...).

edin-m
  • 3,021
  • 3
  • 17
  • 27