Is there a way to outsource image uploads?

I’m trying to keep my rails app lean and mean and want to avoid (if
possible) dealing with image uploads, thumbnail generation, running
RMagick etc.

I was excited about Amazon letting you upload files directly from the
browser to your S3 bucket (http://doc.s3.amazonaws.com/proposals/
post.html) but I couldn’t figure out how to generate thumbnails - has
anyone figured this out?

Nirvanix (http://www.nirvanix.com) also supports uploading images
directly AND thumbnail generation but I wasn’t able to find
documentation on how to integrate with Rails…

If anyone has ideas on this please share :slight_smile:

I haven’t heard that Amazon has a service to generate thumbnails. I
use RMagick.

It was pretty easy to write a ruby script that read the specified
image files, loaded an image, generated the thumbnail, and wrote it
out into the file system under a new name. I used the RMagick and
ActiveRecord API’s and at that point didn’t have any of this code in a
Rails app. Now I do.

My needs were to read a list of image file names from the database,
and to update the database with the new names of the thumbnail image
files. Otherwise I wouldn’t have needed to use ActiveRecord at all.

F

You can try using picasa (they have an api, but I can’t find a rails
module for it) or flickr as a backend image store, that might work.

In general, though, you really should be handling that stuff, if only
because you need to control the thumbnail size for good layouts. You
are also probably going to want to add in watermarking/site captioning
and other things as your site progresses.

If you really really want to offload this, check this out:
http://www.aurigma.com/.
This tool allows you to offload all the CPU costs to the client, and
it delivers the uploaded data to your server for further processing.
It’s an activex/java hybrid (depending on the browser/OS) that handles
a lot of this for you, and feels less like a web form and more like an
application (because, in reality, it is ;). You just need to
daemonize some ruby process to handle the incoming data.

this might help.

Thanks for the responses. I checked out aurigma.com but I was put off
by the java applet that took a while to load plus the authorization
message. They also seem more geared towards users who need to
manipulate their images - we just need basic image storage and their
thumbnails.

Using picasa or flickr sounds like a good idea, but I’m not sure so
sure if it’s a good solution for a site with many users who will each
upload their own pictures (both in terms of cost structure and
limiting usage to individual users). But I could be wrong about this
since I haven’t dug too deep into their APIs.

Any other thoughts? :slight_smile: We’re leaning towards nirvanix… but the lack
of rails or ruby specific documentation is discouraging.

On Apr 15, 5:11 pm, “Elad M. - Creopolis.com[email protected]