Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How do I know if it is the file being updated? Since it could just be the item properties.

Thank you.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I don't think there is an easy way.

One approach you could take would be to create a hidden field on the document library that stores an MD5 hash of the file contents (set by the event receiver) and then when the item updated event occurs, compare the stored hash against the hash of the current file contents. If they are different, then the file has changed, and you would update the stored hash with the new hash.

Having said that, this probably won't work with MS Office documents, since whenever you update the SharePoint properties of a word doc for example, the properties are also written into the content of the document, thus changing the file.

share|improve this answer
    
Thanks Paul, good idea. Not worth the dev time in my case, even if it would only take a couple hours. –  KyleM Dec 8 '11 at 16:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.