Upload files with Angular with a post containing other form data
<p>I have followed countless examples (from here and other sites) that explain how you upload files from Angular to a web server. I am happy with the solution of using angular-file-upload and processing the data on the server (Node) with Multer. </p>

<p>What I haven't been able to find is a way to upload files from the form with a post that contains all the other controller data. </p>

<p>controller: </p>

<pre><code>$scope.files = [];
$scope.name = "";
$scope.post = //$http post to server from service
</code></pre>

<p>view: </p>

<pre><code>&lt;input type="text" ng-model="name"&gt;
&lt;input type="file"&gt;
&lt;button ng-click="post()"&gt;Send post without page refresh&lt;/button&gt;
</code></pre>

<p>Is there a way I can send the [name] and the [files] in the same post? If I send with multi part data will that be ok for [name] and [files]? Do I need to send two separate posts?</p>

<p>At the moment, my working example submits with a form action of 'post' and an enctype of "multipart/form-data". But I don't want the page to refresh and I want to send [name] and [files] from the scope... do I need to attach the files from the form to the scope or get the scope to pull the files from the DOM?</p>