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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

override addUploadToFolder


Go to End


661 Views

Avatar
Pix

Community Member, 158 Posts

24 February 2017 at 7:34am

Edited: 24/02/2017 7:41am

I need to override the addUploadToFolder method. That doesn't seem to be available to DataExtension. So then I step it up and try:

Object::useCustomClass('Folder', 'S3Folder');

That doesn't seem to work either. Basically, I am working with an S3 module and trying to remove the file from assets. When I unlink the file in assets and move to S3 in onAfterWrite, it breaks the relationship to the DataObject.

Have mercy! Any suggestions? :-)