No commit activity in last 3 years
No release in over 3 years
Extension for AttachmentFu (http://github.com/technoweenie/attachment_fu) which uses the Google App Engine for storage and image resizing.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme
AttachmentFuAppEngine
=====================

Extension for AttachmentFu (http://github.com/technoweenie/attachment_fu) which uses the Google App Engine for storage and image resizing.  Allows you to add or change thumbnail sizes without migrating previous data and removes the need to install ImageMagick.

The Google App Engine backend code is included so you can run it in your own App Engine instance.

Example
=======

class Photo < ActiveRecord::Base
  has_attachment :storage => :app_engine, :thumbnails => {:small_square => "45x45!"}
end

AttachmentFuAppEngine attempts to reproduce the resize format from ImageMagick.

* "100x100"  - scale the image to fit within a 100x100 box (the larger dimension will be 100, such as 100x75), preserving the aspect ratio.  Will scale up small images.
* "100x100!" - scale the image to be exactly 100x100 by scaling proportionately and cropping off the edges.  Will not distort the image but may hide part of it.
* "100x100>" - scale the image to be at most 100x100 - smaller images will not be enlarged.

In addition to the standard thumbnail specification:
Image.find(1).public_filename(:small_square)

you can also use:
Image.find(1).public_filename('40x40!')


Installation
============

script/plugin install git://github.com/larsklevan/attachment_fu_app_engine.git


Migration
=========

You can use the provided rake task to move data from S3 to the App Engine.  Just run:
rake ATTACHMENT_CLASS=Image migrate_s3_to_app_engine


Configuration
=============

You can use your own instance of the App Engine code to store images so you have your own quotas.  Use
the provided app engine code and configure the URL as follows:

Technoweenie::AttachmentFu::Backends::AppEngineBackend.base_url = "http://attachment-fu-gae.appspot.com"


Limitations
===========

* Tested with Rails 2.1 only
* Google App Engine is in early release, so if you go past your daily storage/bandwidth/CPU limit you are out of luck.
* Google App Engine does not support HTTPS.
* Google App Engine currently has a limit of 1MB per reocrd

For more information about the status of the App Engine see http://googleappengine.blogspot.com/2008/04/were-up-and-running.html

Copyright (c) 2008 Lars Klevan, released under the MIT license