Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Rename file on Upload

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

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

Page: 1
Go to End
Author Topic: 584 Views
  • Andre
    Community Member
    126 Posts

    Rename file on Upload Link to this post

    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.



  • Willr
    Forum Moderator
    5508 Posts

    Re: Rename file on Upload Link to this post

    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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.