【发布时间】:2017-04-14 19:38:26
【问题描述】:
通过回形针上传文件后,我在 heroku 上遇到以下错误。
AWS::S3::Errors::PermanentRedirect(您尝试访问的存储桶 访问必须使用指定的端点进行寻址。请全部发送 未来对该端点的请求。)
这是我在模型中的设置
has_attached_file :profile_image,
:styles => { :myrecipes => "260x180#"},
:storage => :s3,
:s3_region => 'us-west-1',
:s3_credentials => "#{Rails.root}/config/amazon_s3.yml",
:path => "/images/:id/:style.:extension",
:url => ":s3_domain_url"
这是在 S3 上进行开发和存储图像,但在我尝试生产 (Heroku) 时出现错误。
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-4 heroku amazon-s3 paperclip