Weird error between 2 environments - FormData bug with $http POST (AngularJS - RoR)
问题 I am stuck with an inconsistent bug when I try to submit a FormData object to the server via the $http method. The form is sent when I am running the rails server locally on MACOSX but when I either push the code to staging (ubuntu 14.04) or when my coworker (Xubuntu) tries it, the payload object is empty ({}). Here is my setup: return $http.post(url, parsed.form, self.$headers).then(function(res){ self.$parseResponse(res.data, parsed.attrs); return self; }); where parsed.form is a FormData