permanentredirect s3用于未指定的端点

Mau*_*oon 3 ruby-on-rails amazon-s3 ckeditor ruby-on-rails-3

我正在尝试使用s3,但我遇到了许可问题(我认为).

输出:

 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.
Run Code Online (Sandbox Code Playgroud)

我正在使用ckeditor.我的Ckeditor :: Picture类包括:

  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
Run Code Online (Sandbox Code Playgroud)

在s3.yml中,我得到了:

access_key_id: "key"
secret_access_key: "key"
bucket: "name"
AWS_CALLING_FORMAT: SUBDOMAIN
Run Code Online (Sandbox Code Playgroud)

我错过了什么?提前thx!

tfi*_*ach 8

使用paperclip3.1.4版,只需s3_host_name在我的s3.yml文件中添加一个键即可:

development:
  bucket: 'bucket.name'
  access_key_id: 'xxx'
  secret_access_key: 'xxx'
  s3_host_name: 's3-eu-west-1.amazonaws.com'
Run Code Online (Sandbox Code Playgroud)