Carrierwave错误:参数错误:无效的基础64

时间:2015-11-30 12:28:22

标签: ruby-on-rails azure carrierwave

我正在使用Carrier-wave gem将图像上传到我的Azure blob容器中。上传在我的localhost和heroku上运行良好。但是,当我部署到我的Azure服务器时,它会出现以下错误:

12:02:35 web.1  | Started POST "/admin/images" for 41.75.85.2 at 2015-11-30 12:02:35 +0000
12:02:35 web.1  | Processing by Admin::ImagesController#create as HTML
12:02:35 web.1  |   Parameters: {"utf8"=>"✓", "authenticity_token"=>"", "hint"=>"", "file"=>#<ActionDispatch::Http::UploadedFile:0x007f8d79566b30 @tempfile=#<Tempfile:/tmp/RackMultipart20151130-10-1bcjsse.png>, @original_filename="haba_cousins.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"haba_cousins.png\"\r\nContent-Type: image/png\r\n">, "alt"=>""}
12:02:35 web.1  | #<ActionDispatch::Http::UploadedFile:0x007f8d79566b30>
12:02:35 web.1  |    (0.5ms)  BEGIN
12:02:35 web.1  |   SQL (0.5ms)  INSERT INTO "images" ("picture", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"  [["picture", "haba_cousins.png"], ["created_at", "2015-11-30 12:02:35.767230"], ["updated_at", "2015-11-30 12:02:35.767230"]]
12:02:35 web.1  |    (0.3ms)  ROLLBACK
12:02:35 web.1  | Completed 500 Internal Server Error in 397ms (ActiveRecord: 1.3ms)
12:02:35 web.1  |
12:02:35 web.1  | ArgumentError (invalid base64):
12:02:35 web.1  |   app/controllers/admin/images_controller.rb:16:in `create'

在我的Image.rb模型中,我有:

class Image < ActiveRecord::Base
  mount_uploader :picture, ImageUploader
end

我有谷歌的错误,但似乎无法找到我可以使用的信息。

任何帮助将不胜感激。感谢。

0 个答案:

没有答案