I am using CarrierWave with Fog for my Rails app to uploads my image to AWS S3 bucket. My config as follow:
CarrierWave.configure do |config|
config.fog_provider = 'fog/aws' # required
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => 'KEY',
:aws_secret_access_key => 'SECRET',
:region => 'us-west-2'
}
config.fog_directory = 'bucket101'
config.fog_public = true
config.fog_attributes = { 'Cache-Control' => "max-age=#{365.day.to_i}"}
end
The upload is success, but I can't view the uploaded image on the browser. This is what I get.
Thanks!!