我得到了uploadify,可以正常使用我没有任何身份验证的模型。 问题是,用户需要在他/她可以上传文件之前进行身份验证。 当我启用之前的过滤器时,文件不会被上传。Uploadify在rails中被http_basic_authentication阻止
before_filter :authenticate
def authenticate
authenticate_or_request_with_http_basic do |name, password|
name == "foo" && password == "bar"
true
end
end
启用此功能。上传失败。以下是我在开发日志中看到的内容:
Filter chain halted as [:authenticate] rendered_or_redirected.
Completed in 2ms (View: 1, DB: 0) | 401 Unauthorized
这只发生在Flash上载中,而不是正常的下载。
任何想法?
谢谢!
我很想找到解决这个基本身份验证问题......我不想设置更复杂的身份验证系统(我已经使用设计) – Alex 2011-06-02 05:50:06