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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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



Community Member, 244 Posts

6 November 2012 at 4:31pm

Edited: 07/11/2012 1:59am

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?