Im using Slingshot to upload images to an S3 bucket so users can set profile pictures. If they set a new profile picture the old one won’t be used again. How should I delete this old image?
I can think of 2 ways.
1: Use Slingshot to tell Amazon to delete the image when a new profile image is set.
2: Have a cron job with Amazon. As the image filenames are set to userID-date.jpg presumably I could look for duplicate userID’s and then delete the older time?
Has anyone done either of these or tried a different approach?