Check if image/ document is Changed

1
Is it possible to check when an image is changes. (different document is uploaded with the same name) I don't want check if it committed but really the content of the file is changed. In the CommunityCommons there is a function "memberHasChanged" When it checks the member 'Contents' It will not return true when an document is updated. Though it works when I create a new Image/document In the java code is stated item.getMember(context, member).getState() == MemberState.CHANGED || item.getState() != ObjectState.NORMAL; Is there another method the check if there is any changes? Thank you, Andries
asked
1 answers
2

Andries,

You could store a checksum from the byte array when the file document is stored, and when it is overridden check the checksum of the new file against the old one and then update the checksum. For example see this site to get you going.

answered