views:

30

answers:

1

I have this line..

@organization.search_image = File.open(@photo.photo.path(:original))

Except that 's looking for something local, and all my photos are on S3 now. How would I translate that to opening a file on S3?

A: 

You have two options that come to mind:

  1. Use the S3 Ruby bindings and access your data using the S3 provided abstractions.
  2. Continue with the filesystem abstraction but bind S3 to a local proxy filesystem using FUSE which is available for *nix/OSX (but not for Windows as far as I know) making this approach less generally applicable. This is probably less efficient than option 1 too.
bjg
While S3 Ruby bindings works, I can't seem to translate that into something I could use on my local box, let along to resend back up to the server. I found out about Right_Aws, and wrote a script out for that but it doesn't handle writing and re adding to the server.
Trip