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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

FileDataObjectManager onAfterWrite not firing when attaching existing files


Go to End


1962 Views

Avatar
JonShutt

Community Member, 244 Posts

6 November 2012 at 4:31pm

Edited: 07/11/2012 1:59am

Hi,
I've got a FileDataObjectManager. The dataobject it creates for each file uploaded has an onAfterWrite() function in it, which sorts out the file name

It runs fine when uploading new files, but if you move to the 'choose existing' tab, and import files that already exist, the onAfterWrite() function isn't getting called.

Any ideas how I could do this?

Cheers

Jon