我使用回形针将文件添加到我的模型。我想使用firefox3.6的新功能,xhr.sendAsBinary,通过ajax请求发送文件。这是我构建请求的方式:varxhr=newXMLHttpRequest();xhr.open("POST","/photos?authenticity_token="+token+"&photo[name]="+img.name+"&photo[size]="+img.size);xhr.overrideMimeType('text/plain;charset=x-user-defined-binary');xhr.sendAsBinary(bin);na