title: How to use browsers File API with PhoneGap web app?
body: <p>I have created a PhoneGap based web app some time ago. </p>
  
  <p>Since input type file is now possible on iOS 6, I want to use it and the native File API as well, but keep using PhoneGap to be able to put the app in the Appstore.</p>
  
  <p>BTW: I have found <a href="https://stackoverflow.com/questions/7564533/how-to-disable-phonegap-apis-functionality">this link</a>, but this does not work: Everytime I access File functionality I get an ERROR from PhoneGap and it basically does nothing.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>In fact getting the file (image) and sending it to the server works fine, but before that I want to resize the image (to reduce file size) by using <a href="https://github.com/gokercebeci/canvasResize" rel="nofollow noreferrer">canvasResize</a>. When the function reader.readAsDataURL(file) is called, I get the following error:</p>
  
  <pre><code>-[CDVJKDictionary pathExtension]: unrecognized selector sent to instance 0x208892b0
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CDVJKDictionary pathExtension]: unrecognized selector sent to instance 0x208892b0'
  </code></pre>
  
  <p><strong>Update 2:</strong></p>
  
  <p>Here is the relevant code that I use:</p>
  
  <pre><code>var reader = new FileReader();
  var fileInput = document.getElementById('ideaCommitFileInput');
  var file = fileInput.files[0];
  reader.readAsDataURL(file);
  </code></pre>