Algunas preguntas sobre la configuración de Amazon S3 con Ruby on Rails

I'm trying to setup Amazon S3 hosting with my Ruby on Rails 3 app, which is hosted on Heroku. After reading estas instrucciones in the Heroku docs, I'm trying to use the aws-s3 gem.

La Instrucciones say to put the S3 account details in config/amazon_s3.yml, Pero el aws-s3 Github page says you create a connection like this:

    :access_key_id     => 'abc', 
    :secret_access_key => '123'

Why is the connection created by providing the details if they're already provided in the config file? Is that not the correct way to establish a connection? Do I have to establish a connection for each user everytime an upload is about to occur, or is a connection established for the application as a whole?

Gracias por leer.

preguntado el 09 de enero de 11 a las 02:01

1 Respuestas

You're reading documentation for different gems. If you use Attachment-Fu or Paperclip, they'll manage S3 connection internally and you need to only provide credentials. If you access S3 directly (through aws-s3 gem), you'll need to establish connection explicitly.

Respondido el 09 de enero de 11 a las 05:01

Whoops, that's embarrassing. Thanks for your help. - bien

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.