title: Automatically upload photo in Phonegap after taking picture with camera
body: <p>Using PhoneGap's API for camera and file I am trying to make it so that when I take a photo in a certain app it is automatically uploaded to the server I'm using.</p>
  
  <p>I have copied both of the API's into my index.html file and the only thing I changed is to add another javascript variable imageInfo that is set equal to ImageData in the block for onPhotoDataSuccess.  This imageInfo is then set as the parameter of uploadPhoto when I call it.</p>
  
  <p>The only other thing I changed was to put the line:   <code>navigator.camera.DestinationType(1);</code> so that the output is the <code>imageURI</code> which is what <code>uploadPhoto</code> takes.</p>
  
  <p>My only code in HTML is:</p>
  
  <pre><code>button onclick="capturePhoto(); uploadPhoto(imageData);"&gt;Capture Photo&lt;/button (in brackets of course)
  </code></pre>
  
  <p>But for some reason it isn't working.  Any tips or flaws you see in my reasoning?</p>
  
  <p>Thanks!</p>