I have been trying to figure out how / if I can attach an image to a dataobject before I save it for the first time. I know why I have to save it first but I was playing around with onAfterWrite and onBeforeWrite thinking I could accomplish this that way. I haven't had any luck.
I used to use DataObjectManager for this in 2.4. Thanks for your help.