I\'m experimenting with s3 but im running into a permission problem (i think).
Output:
AWS::S3::PermanentRedirect in CkeditorController#create
The
With paperclip
version 3.1.4, simply adding a s3_host_name
key to my s3.yml
file worked:
development:
bucket: 'bucket.name'
access_key_id: 'xxx'
secret_access_key: 'xxx'
s3_host_name: 's3-eu-west-1.amazonaws.com'
We can use default endpoint like following code.
s3_credentials: {
access_key_id: AWS_CONFIG['access_key_id'],
secret_access_key: AWS_CONFIG['secret_access_key'],
bucket: AWS_CONFIG['bucket'],
},
s3_host_name: 's3.amazonaws.com',
s3_endpoint: 's3.amazonaws.com',
storage: :s3,
s3_headers: { "Cache-Control" => "max-age=31557600" },
s3_protocol: "https",
bucket: AWS_CONFIG['bucket'],
:url =>':s3_domain_url',
:path => '/:class/:attachment/:id_partition/:style/:filename',
default_url: "/:class/:attachment/:id/:style/:basename.:extension",
default_style: "medium"
I suppose your bucket is not in US Standard zone. Have you tried to add "AWS_CALLING_FORMAT: SUBDOMAIN" to your .yml file? The request should be pointed then to the endpoint corresponding with the region of your bucket.