discourse/discourse — pull request #1275 by ZogStriP (2013-07-31 21:52:20+00:00)
Title: Enable thumbnailing on s3

This enable thumbnailing on S3.

This adds a `url` property to the `optimized image` model. So that we can store the url to optimized images.
The important bits are in the `create_for` method in [`app/models/optimized_image.rb`](https://github.com/ZogStriP/discourse/blob/ed9417fa3bf8609728735ed2c968e96fdc0881ee/app/models/optimized_image.rb#L6-L34).

When we're creating a thumbnail, we need to download a copy of the original image, resize it using ImageSorcery, upload it to the store and remove the local copy.

The rest is mostly a bunch of refactoring & moving code. `s3_store` and `local_store` are now in the `file_store` module.