Upon further investigation - I'm noticing the images on Amazon S3 are all .PNG while the majority of the images locally are .JPG. I understand it's because I have image format set to PNG's in ActiveSocial - but just curious why the original isn't deleted?
If the image isn't listed in the activesocial_Files table - I'm assuming I can delete it.... so that's what I just did and released 2.8 GB of space!
What I did is write a small program to do the following.
FIRST I BACKED UP MY portals/0/activesocial folder (THIS IS IMPORTANT!!!)
localImages = Get all images from activesocial_Files where the FilePath starts w/ "~" (no quotes)
s3Images = Get all iaimges from activesocial_Files where FilePath starts w/ "http://" (no quotes)
Looping s3Images do the followign:
[LOOP]
tempFileImage = s3Image Filename.Replace(".png", ".jpg) (as my imgs are converted to PNG on S3)
make sure localImages doesn't contain an img w/ Filename = tempFileImage (if it does - the image is supopse to be local and not deleted)
[LOOP for sm, md, and lg folders]
check if file exists locally, if so, delete it
[/LOOP for sm, md, lg]
[/LOOP]
NOTE: I did NOT modify anything in the DB - I only deleted Local files that seem to have no reference from the activesocial_Files table... as it seems to me that nothing is using them.
Everything seems to be OK - but I've got way too many groups to physically check them. The files seem aligned w/ the db table.
If I just went nuts and did something stupid - please let me know ASAP!