You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the best way to remove old styles from s3 for an attachment? Is there a build in way to do this? For example, in s3, an attachment currently has thumbnail, standard, original, and zoom. However, on the model, I have removed the standard style. When I run the reprocess command on the attachment, I was hoping the standard style would be deleted from s3, but that doesn't seem to be happening.
Is there a way to do this using the library or do I have to manually remove the old files?
The text was updated successfully, but these errors were encountered:
The reprocess command doesn't remove old styles because it has no way of knowing what was (previously) there. If you wanna build a command specifically for removing an old style I'll help you get it cleaned up and merged in, but it needs to be for the laravel-stapler repo. I'm working on a 2.0 release that I could add this to if it doesn't get done now. I've gotta ask though; If you just have a single style that you want to remove, why not just remove those images (in the standard folder) using the AWS console?
Ok, I will try to find some time to build that command. I think your question is assuming that all of the standard style images are in a single folder. That's not how the files are organized. They are first partitioned by id, then the different style directories are within that. In other words:
001 > original
standard
thumbnail
zoom
002 > original
standard
thumbnail
zoom
003 > original
standard
thumbnail
zoom
There are hundreds of images, so I would need to go into every id folder and delete the standard directory.
What is the best way to remove old styles from s3 for an attachment? Is there a build in way to do this? For example, in s3, an attachment currently has
thumbnail
,standard
,original
, andzoom
. However, on the model, I have removed thestandard
style. When I run thereprocess
command on the attachment, I was hoping thestandard
style would be deleted from s3, but that doesn't seem to be happening.Is there a way to do this using the library or do I have to manually remove the old files?
The text was updated successfully, but these errors were encountered: