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 :(
help me to solve this .