I'm trying to upload files to rails using ng-file-upload. My javascript looks like this...
$upload.upload({
url: 'api/my_resource.json',
data: {
files: files
}
})
console.log("files to upload", files);
... where files
is an array of Files. The console prints
files to upload [File, File]
When I print the request parameters received by my Rails controller, though, I see this:
Parameters: {"data"=>"{\"files\":[{},{}]}"}
I seems that the files aren't being transmitted. Does anyone know what I'm doing wrong?