title: How to get FileEntry object while using Cordova Simulate
body: <p>I'm trying to follow the <a href="https://github.com/apache/cordova-plugin-camera#module_camera.getPicture" rel="nofollow noreferrer">Take a picture and get a FileEntry Object</a> example for the Cordova Camera Plugin. I'm using Cordova Simulate in
  Visual Studio 2017 to test the example by selecting "Simulate In Browser"</p>
  
  <p>Taking a picture works and the image is shown in the simulator, using the same <code>imageUrl</code> that is passed to the Cordova Files Plugin in this code snippet:</p>
  
  <pre><code>function cameraSuccess(imageUri) {
    window.resolveLocalFileSystemURL(imageUri, function () {
      console.log('success')
    }, function (error) {
      console.log(error.message);
    });
  
    return imageUri;
  }
  </code></pre>
  
  <p>However, the call to resolveLocalFileSystemURL fails with the following error:</p>
  
  <blockquote>
    <p>A URI supplied to the API was malformed, or the resulting Data URL has
    exceeded the URL length limitations for Data URLs.</p>
  </blockquote>
  
  <p>What do I need to do to get this working?</p>
  
  <p><strong>EDIT</strong>
  I found this instruction in the <a href="https://www.npmjs.com/package/cordova-plugin-file#chrome-quirks" rel="nofollow noreferrer">Chrome Quirks</a> section of the plugin documentation </p>
  
  <blockquote>
    <p>resolveLocalFileSystemURL method requires the inbound url to have
    filesystem prefix. For example, url parameter for
    resolveLocalFileSystemURL should be in the form
    filesystem:file:///persistent/somefile.txt as opposed to the form
    file:///persistent/somefile.txt in Android.</p>
  </blockquote>
  
  <p>So I changed the code to:</p>
  
  <pre><code>  if (device.isVirtual) {
      if (!window.isFilePluginReadyRaised) {
        //added to check another potential Chrome quirk
        //the alert wasn't never shown so I don't think it's an issue
        alert('!window.isFilePluginReadyRaised');
      }
  
      imageUri= 'filesystem:' + imageUri;
    }
  
  window.resolveLocalFileSystemURL(imageUri, function () {
    console.log('success');
  }, function (error) {
    console.log(error.message);
  });
  </code></pre>
  
  <p>Now the error message is:</p>
  
  <blockquote>
    <p>It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file
    resources.</p>
  </blockquote>
  
  <p>Another Chrome quirk is:</p>
  
  <blockquote>
    <p>Chrome requires --allow-file-access-from-files run argument to support
    API via file:/// protocol.</p>
  </blockquote>
  
  <p>It is not clear whether Cordova Simulate launches Chrome with this argument. This problem has been raised before:</p>
  
  <p><a href="https://stackoverflow.com/q/47154220/150342">Cordova: Launching chrome with --allow-file-access-from-files from VS 2017</a></p>
  
  <p><a href="https://stackoverflow.com/q/34925292/150342">Can&#39;t use cordova-plugin-file in Chrome : SecurityError when calling window.resolveLocalFileSystemURL</a></p>
  
  <p>So perhaps the solution is to get Cordova Simulate to "allow-file-access-from-files" ? How would I test that hypothesis?</p>
  
  <p><strong>EDIT</strong>
  One way to test the hypothesis is to run the simulator from a command line as suggested in a comment under <a href="https://stackoverflow.com/a/48854125/150342">this answer</a>. You can get the command to run by typing <code>chrome://version/</code> in the address bar after launching the simulator. I added the flags <code>--allow-file-access-from-files</code> and <code>--unlimited-quota-for-files</code>, but got the same security error</p>