Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Spring Cleaning SilverStripe

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: 267 Views
  • Stef87
    Avatar
    Community Member
    66 Posts

    Spring Cleaning SilverStripe Link to this post

    Hi

    I'm using 2.4.7.

    I know this is probably a silly question but I was wondering about something. I have implemented a method that generates images based on info provided. There can be hundreds at a time but they are usually only about 286 bytes. I was wondering whether there iss any way to programmatically spring clean every once in a while since, even though they are small, they will mount up over time. My user will not be able to do this so I was wondering if there was any clever way of doing it for them?

    Thanks

  • martimiz
    Avatar
    Forum Moderator
    1086 Posts

    Re: Spring Cleaning SilverStripe Link to this post

    You could of course just remove them using ftp, then resync... But that would also remove images that are still used somewhere, unless you know exactly which images to target.

    It's not easy to detect if images are used, as they can be related (has_many, has_one) to different dataobjects and/or hard-coded in the Content, so that would take some clever scripting, taking into account how your site is built...

    267 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.