您好我已经在Rails 2应用程序中集成了Zoho工作表,我可以从本地打开新的Zoho Sheet,但是当我点击zoho编辑器的保存时,它会将文件发送给我的服务器, 这是我的生产日志
Processing ZohoController#index to #<File:0x6a49f88> (for *.*.*.* at 2015-10-08 11:24:08) [POST]
Parameters: {"controller"=>"zoho", "filename"=># <File:/tmp/RackMultipart20151008-2490-oxplae-0>, "content"=>#<File:/tmp/RackMultipart20151008-2490-3r5nf3-0>, "eventsource"=>#<File:/tmp/RackMultipart20151008-2490-yj8j8h-0>, "format"=>#<File:/tmp/RackMultipart20151008-2490-1nfald4-0>, "id"=>#<File:/tmp/RackMultipart20151008-2490-yeqxb8-0>, "action"=>"index"}
ActionController::InvalidAuthenticityToken
我无法获取文件,任何人都可以帮我解决如何访问文件,即使我检查了每个参数,但我无法实现 任何帮助都很有价值
答案 0 :(得分:1)
服务器日志显示“Invalid Authenticity Token”消息。这意味着rails服务器在先前的请求cookie中保存的令牌与您的POST请求发送的令牌不匹配。
如果这是此服务/服务器的第一次交互,并且没有以前的令牌可用,则跳过此特定操作的验证(即索引操作)
class FooController < ApplicationController
protect_from_forgery except: :index
要进一步了解此主题,请参阅Understanding the Rails Authenticity Token