Ruby on rails 错误:`找不到处理程序',回形针5.2的Base64

Ruby on rails 错误:`找不到处理程序',回形针5.2的Base64,ruby-on-rails,ruby,paperclip,Ruby On Rails,Ruby,Paperclip,我在将图像作为base64上传时遇到问题 使用回形针版本5.1.0或更低版本时一切正常 我的模型: do_not_validate_attachment_file_type :image has_attached_file :image 我的控制器操作: def update current_appointment.update(update_params) redirect_to check_in_flow.next_step_path end private def upd

我在将图像作为base64上传时遇到问题

使用回形针版本5.1.0或更低版本时一切正常

我的模型:

do_not_validate_attachment_file_type :image

has_attached_file :image
我的控制器操作:

def update
  current_appointment.update(update_params)

  redirect_to check_in_flow.next_step_path
end

private

def update_params
  params.require(:appointment).permit(:image)
end
我的爱人:

<ActionController::Parameters {"appointment"=>{"image"=>"data:image/png;base64, iVBORw0KGgo..."}, "controller"=>"my_controller", "action"=>"update"} permitted: false>
是否有人遇到过类似的问题,也许新版本不再支持base64

回形针版本:5.2.0或最新版本

Rails版本:5.1.4


Ruby版本:2.3.4p301

升级后遇到类似问题,发现解决方案是将以下内容添加到
config/initializers/paperclip.rb

Paperclip::DataUriAdapter.register
看起来这是在5.2.0之前发生的

Paperclip::DataUriAdapter.register