title: AngularJS: Upload files using $resource (solution)
body: <p>I'm using AngularJS to interact with a <code>RESTful</code> webservice, using <code>$resource</code> to abstract the various entities exposed. Some of this entities are images, so I need to be able to use the <code>save</code> action of <code>$resource</code> "object" to send both binary data and text fields within the same request.</p>
  
  <p>How can I use AngularJS's <code>$resource</code> service to send data and upload images to a restful webservice in a single <code>POST</code> request?</p>