Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I don't know if anyone can help, but I'm trying to detect, by catching the event of BeforeSave for a media item, if the file (umbracoFile) has been changed.
I'm not sure how to get to the previous version to tell. I assumed that before save then I would be able to access the existing item before the new one was saved over the top, but it seems not.
Any help gratefully appreciated.
No the media item object is already updated when this event gets fired. And since Media doesn't support versioning it's not possible to get the previous version also.
Thanks very much for the response Richard.
This is a bit late but....
Have you tried the IApplicationEvenHandler interface? Its new in (4.8+ i think). You can hook into the application start and setup a handler for the ContentType BeforeSave event. The sender is of type Content and will have the nodeId of the element that you editing.. you 'should' be able to get at it before its updated.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted