mygetlist/pin — pull request #75 by camilotorresf (2014-04-25 02:03:38+00:00)
Title: Migration of pin images to S3

Now the images for the pins will be hosted in S3.

1. Create two environment variables:
AWS_ACCESS_KEY_ID - Your AWS Access Key ID
AWS_SECRET_ACCESS_KEY - Your AWS Secret Access Key
You should have these keys

2. Run the database sentences:
-- use external servers to upload and serve pin images
alter table pins add image_212_url text;
alter table pins add image_202_url text;
alter table cool_pins add image_url text;

-- these columns are not used
alter table photos drop filename;
alter table photos drop sizes;

also drop this table that is no longer in use:
drop table pin_photos

3. Migrate the images to S3 by running the script migrate_all_images_to_s3.py located in:
config/utils/migrate_all_images_to_s3.py

run this to get the options for the program:
python migrate_all_images_to_s3.py -h

Please use Python 2.7

4. Remove the contents of the directory:
static/tmp/

but... don't remove the directory itself, it is still used for temporary file storage.