在 aws elastic beantalk 中部署的站点
aws.yml
production:
access_key_id: 123333231331....
secret_access_key: 12212dddddd........
生产.rb
config.paperclip_defaults = {
:storage => :s3,
:preserve_files => true,
:s3_credentials => 'aws.yml',
:s3_region => 'ap-south-1',
:s3_host_name => 's3.ap-south-1.amazonaws.com',
:bucket => 'xxxxxx'
}
我还在 s3 存储桶中授予公共访问权限。
anyone: read write
宝石...
gem 'aws-sdk', '~> 2.10', '>= 2.10.85'
config 文件夹中的 aws.yml 文件夹 -- config/aws.yml