Closed regdog closed 5 years ago
不管用什么AjaxUpload控件,上传文件都会遇到这个问题:
RestClient::Unauthorized at photos/
401 Unauthorized
我想这个是csrf token问题吧,请教如何解决?
ruby-china上有答案,在model里加入:
class User < ActiveRecord::Base attr_accessor :upload_secure_token ... end
不管用什么AjaxUpload控件,上传文件都会遇到这个问题:
RestClient::Unauthorized at photos/
401 Unauthorized
我想这个是csrf token问题吧,请教如何解决?