未指定端点的永久重定向 s3
我正在尝试 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.
我正在使用 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
在 s3.yml 中,我得到:
access_key_id: "key"
secret_access_key: "key"
bucket: "name"
AWS_CALLING_FORMAT: SUBDOMAIN
我缺少什么?提前谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用
paperclip
版本 3.1.4,只需将s3_host_name
键添加到我的s3.yml
文件即可:With
paperclip
version 3.1.4, simply adding as3_host_name
key to mys3.yml
file worked:我想你的桶不在美国标准区域。您是否尝试将“AWS_CALLING_FORMAT:SUBDOMAIN”添加到您的 .yml 文件中?然后,请求应指向与您的存储桶区域相对应的端点。
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.
我们可以像下面的代码一样使用默认端点。
We can use default endpoint like following code.