title: Getting the actual image name from the assets
body: <p>I am developing a phoneGap application in IOS where I use <code>getPhoto('Camera.PictureSourceType.PHOTOLIBRARY');</code> 
  to access the photo library and select an image. following is the onPhotoURISuccess method where I need to get the url of the image and pass it to my native plugin to validate it's filesize, resolution and file extension.</p>
  
  <p>this is my getPhoto() method</p>
  
  <pre><code>// A button will call this function
      function getPhoto(source)
      {            
          // Retrieve image file location from specified source
          navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 100,
                                      destinationType: navigator.camera.DestinationType.NATIVE_URI, sourceType: source });
      }
  </code></pre>
  
  <p>and this is the onPhotoURISuccess method,</p>
  
  <pre><code>// Called when a photo is successfully retrieved
      function onPhotoURISuccess(imageURI)
      {
          img_uri = imageURI;
          console.log('NATIVE_URI==&gt;'+img_uri);
  
          // Get image handle
          var imgPrev = document.getElementById('imgPreview');
  
          // Unhide image elements
          imgPrev.style.display = 'block';
  
          // Show the captured photo
          // The inline CSS rules are used to resize the image
          imgPrev.src = imageURI;
  
      }
  </code></pre>
  
  <p>I have three options for this according to the phoneGap documentation. using DATA_URL, FILE_URI or NATIVE_URI.
  FILE_URI seems to be hiding underlying data of the image where it always returns me a jpeg image thus the actual extension is hidden</p>
  
  <p>assets-library://asset/asset.JPG?id=5CF16D20-9A80-483A-AC1C-9692123610B1&amp;ext=JPG
  I want to know how to get the actual image name along with the extension from this.</p>
  
  <p>I need to get the image name and validate the extension.</p>
  
  <p>someone please do help me with posssible approach for me to follow</p>
  
  <p>thanks in advance</p>