Rails 3.1 和 CKEditor w Carrierwave,无法上传
上传文件对我来说不起作用。文件确实被保存,但查看参数,CKeditor 没有发送真实性令牌。因此,我收到“无法验证 CSRF 真实性”警告,这会重置会话,然后我无法更新帖子。
令牌在表单中设置,但 CKEditor 似乎没有发送它以进行图片或文件上传。我认为当我将 CKE 与 Paperclip 一起使用时,这可能没问题,但不确定。所有其他 CKE 操作均有效。
Uploading files won't work for me. The file does get saved but looking at the parameters there is no authenticity token sent by CKeditor. So I get a "Can't verify CSRF authenticity" warning, which resets the session, then I can't update the post.
The token is set in the form but CKEditor doesn't seem to send it for picture or file uploads. I think this may have been OK when I used CKE with Paperclip, but not certain of that. All other CKE operations work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
回答于 Ruby on Rails:让 CKeditor 上传图像时出现问题
需要跳过验证
Answered at Ruby on Rails: problem getting CKeditor to upload images
You need to skip verification
请参阅 ckeditor 代码:
请添加一些类似的代码:
Please see the ckeditor code:
Please add some alike: