Jump to:

23361 Posts in 18124 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » UploadField with dateTime appended to filename

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: 167 Views
  • marc79
    Avatar
    Community Member
    65 Posts

    UploadField with dateTime appended to filename Link to this post

    Hi

    I'm trying to find a way of ensuring that users can't overwrite and existing uploaded file so that we will always have a full history of changes made.

    My first thought was to append the current date/time to the filename at upload meaning it would always be unique. However I can't seem to find a way of doing this. Is it possible?

    Or if there is another, better way I'd been keen to hear. Maybe adding a version or ID number to the filename.

    Any help or suggestions would be greatly received.

    thanks

    Marc

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: UploadField with dateTime appended to filename Link to this post

    Sounds like "Versioned Files" (versioned like the sitetree) might be what you are looking for...

    https://github.com/silverstripe-australia/silverstripe-versionedfiles

    167 Views
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.