Hi there,
Does there exist an easy way to rename Files when they are beeing uploaded?
At best by using an extension or a decorator, to make it usable with uploadify Plugin.
Regards
Andre
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Hi there,
Does there exist an easy way to rename Files when they are beeing uploaded?
At best by using an extension or a decorator, to make it usable with uploadify Plugin.
Regards
Andre
You can make an extension to the File object and override the onBeforeWrite function. Here's an example of an image extension for 2.4 that I use onAfterWrite() https://gist.github.com/2298046