title: Uploading image to Kinvey and Angularjs
body: <p>I am trying to change what my app currently does so that instead of inputing a url to reference an image, it uploads the image to the Kinvey collection instead.
  Here is a JSfiddle of how I am currently saving the info from my form to my kinvey collection.</p>
  
  <p><a href="http://jsfiddle.net/k6MQK/" rel="nofollow">http://jsfiddle.net/k6MQK/</a>
  Heres my angular code for saving the form data:</p>
  
  <pre><code>$scope.savePeep = function () {
  
      var dataObj = angular.copy($scope.peep);
      delete dataObj['$$hashKey'];
  
      // Add the ad hoc fields to the peep object if they are filled out
      if ($scope.adHocItem) {
          dataObj.adHocLocation = $scope.adHocItem.normalized_location;
          dataObj.adHocLocation_display = $scope.adHocItem.display_location;
      }
  
  
      KinveyService.savePeep(dataObj, function (_result) {
  
          debugger;
          // update local collection
          KinveyService.setCollectionObject(_result.data, $stateParams.peepId);
  
          $state.transitionTo('home');
      });
  };
  </code></pre>
  
  <p>I want to change it so that instead of a Text input like this:</p>
  
  <pre><code>   &lt;input type="text" id="menu_url" name="menu_url"
   placeholder="" class="form-control" ng-model="peep.menu_url"&gt;
  </code></pre>
  
  <p>its a file upload input that works.</p>
  
  <pre><code>&lt;input type="file" id="menu_url" name="menu_url"
       placeholder="" class="form-control" ng-model="peep.menu_url"&gt;
  </code></pre>