globocom/thumbor — Issue #59: Uploading to Thumbor
Author: mikelikespie
Created: 2012-01-13 19:10:16+00:00
State: open

Not an issue, nor a feature request. Wanted to start a discussion about this and wasn't sure the best way to go about it.

Anyways, I am trying to get us to adopt Thumbor at my job to replace the archaic gem we use in our rails stack.

To get rid of this gem, I really want thumbor to accept image uploads and be responsible for persisting the image.

The behavior I want is something like:

1. I do a PUT to a thumbor server (this service would be listening on a different port than the public facing service
2. The uploader would be configured to use the storage engines. In my case, i created an S3 storage engine, and would use this to asynchronously upload the file to the URL, but also would use the redis engine to cache it.
3. It puts it in redis and asynchronously uploads to the S3 bucket that maps to the image

What this means is: I can do a request immediately to thumbor for the S3 URL before it has finished uploading to S3. Thumbor also becomes responsible for doing the async upload which Tornado is much better at doing than anything in ruby is.

The branch I have in progress is here: https://github.com/mikelikespie/thumbor/tree/uploader

For S3 uploads it may be better to use something similar to the loaders which have async callback. In this case I don't really care *too* much because I want the uploading to happen in the background.

Any thoughts? Could this be something that is useful upstream?

Thanks,
Mike