views:

38

answers:

1

I'm experimenting with s3 but im running into a permission problem (i think).

Output:

 AWS::S3::PermanentRedirect in CkeditorController#create

The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

I'm using ckeditor. My Ckeditor::Picture class includes this:

  has_attached_file :data,
  :s3_credentials => "#{Rails.root}/config/s3.yml",
  :storage => :s3,
  :path => ":attachment/:id/:style.:extension"

  validates_attachment_size :data, :less_than=>2.megabytes

In the s3.yml, ive got:

access_key_id: "key"
secret_access_key: "key"
bucket: "name"
AWS_CALLING_FORMAT: SUBDOMAIN

What am I missing? thx in advance!

A: 

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.

Ania
Maurice Kroon