nowa / carrierwave-upyun

UpYun storage for CarrierWave
161 stars 27 forks source link

RestClient::Unauthorized Issue #22

Closed regdog closed 5 years ago

regdog commented 11 years ago

不管用什么AjaxUpload控件,上传文件都会遇到这个问题:

RestClient::Unauthorized at photos/

401 Unauthorized

我想这个是csrf token问题吧,请教如何解决?

lincank commented 10 years ago

ruby-china上有答案,在model里加入:

class User < ActiveRecord::Base
  attr_accessor :upload_secure_token

  ...
end