EventHandler for file upload with smartfile gets old file
Hi guys,
I am developing in CQ 5.6 and need to parse a file that was uploaded by a content author via the smartfile widget in the page properties. Content of the csv file needs to be parsed and sent as JSON feed to a component.
So I've create an EventHandler that is triggered with:
@Property(name = "event.topics", value = "org/apache/sling/api/resource/Resource/ADDED")
The EventHandler works fine but unfortunately the event is triggered on "upload" and not when the dialog is "saved". So I am actually still grabbing the old file in CRX.
I've checked the event log in Felix and see that NO event is fired when the dialog is 'oked' and saved.
How can I grab the new file?
Any idea or suggestion on how to implement this requirement is very much appreciated :)
Thanks,
Alex