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.
AWS::S3::Base.establish_connection!( :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
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.