0

我正在尝试通过 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::MovedPermanently in Spree::Admin::OptionTypesController#update
Expected(200) <=> Actual(301 Moved Permanently)

任何想法那里发生了什么?

4

0 回答 0