Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 配置Ember以将JSON发送到Rails服务器_Ruby On Rails_Json_Ember.js - Fatal编程技术网

Ruby on rails 配置Ember以将JSON发送到Rails服务器

Ruby on rails 配置Ember以将JSON发送到Rails服务器,ruby-on-rails,json,ember.js,Ruby On Rails,Json,Ember.js,我想将base64图像字符串发送到我的服务器。当我将其作为控制器中的参数发送时,如下所示: this.get('store').createRecord(Emb.Painting, {name: newName, image:base64string]}); this.get('store').commit(); 上载成功,但我收到RequestURITooLarge错误 如何让ember以JSON包的形式发送数据 如果有人能解释一下如何在rails控制器中接收JSON,那也太好了

我想将base64图像字符串发送到我的服务器。当我将其作为控制器中的参数发送时,如下所示:

this.get('store').createRecord(Emb.Painting, {name: newName, image:base64string]});
this.get('store').commit();
上载成功,但我收到RequestURITooLarge错误

如何让ember以JSON包的形式发送数据

如果有人能解释一下如何在rails控制器中接收JSON,那也太好了