1

I captured the image using following method:

 navigator.camera.getPicture(uploadImage, function (message) {}, {
    destinationType: navigator.camera.DestinationType.FILE_URI,
    sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY,
    mediaType: navigator.camera.MediaType.ALLMEDIA
 });

function uploadImage (imageURI){
   window.resolveLocalFileSystemURL(imageURI, function (fileEntry) {
    fileEntry.file(function(file){
         console.log('file type is ',file.type);
    },function(err){
      console.log('error in getting mime type ',err);
    });
   },
   function(err){
     console.log('error in resolving uri ',err);
   });
}

When i choose image / video from gallery i am getting URI like this

content://com.android.providers.media.documents/document/image%3A2119

then ultimately getting error error in resolving uri : error code 1000

Simply i need to get the MIME type of choosen file with URI like above.

I referred below links but no luck :(

one , two

help me to solve this .

1
  • I found the another link which was useful here Commented Jul 28, 2015 at 1:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.