Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Add Image to Dataobject When Its Created


Go to End


1009 Views

Avatar
okotoker

Community Member, 50 Posts

26 September 2012 at 9:49am

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.