Excon :: Errors :: MovedPermanently - 使用Paperclip + Fog上传到S3时

时间:2012-10-24 20:26:39

标签: ruby-on-rails amazon-s3 paperclip

我试图通过Paperclip(2.7.4)将文件上传到S3。我已将模型设置如下:

has_attached_file :swatch,
                :styles => {:preview => '50x50>', :display => '50x50>'},
                :storage => :fog,
                :fog_credentials => {
                    :provider => 'AWS',
                    :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'],
                    :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'],
                    :region => 'eu-west-1'

                },
                :fog_directory => 'FOG_DIRECTORY',
                :path => '/swatches/:id/:style/:filename'

每当我努力尝试上传文件时,我都会遇到以下错误:

  

Excon :: Errors ::在Spree :: Admin :: OptionTypesController中更新永久移动#更新
  预期的(200)< =>实际(301永久移动)

有什么想法在那里发生?

0 个答案:

没有答案